summaryrefslogtreecommitdiffstats
path: root/tests/auto/xmlpatternsdiagnosticsts
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 10:34:13 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 10:34:13 +0100
commit67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch)
tree1dbf50b3dff8d5ca7e9344733968c72704eb15ff /tests/auto/xmlpatternsdiagnosticsts
Long live Qt!
Diffstat (limited to 'tests/auto/xmlpatternsdiagnosticsts')
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/.gitattributes6
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/.gitignore2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/Baseline.xml2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml1046
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml40
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml1
-rwxr-xr-xtests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/test/test.pro32
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp80
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro4
68 files changed, 1284 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternsdiagnosticsts/.gitattributes b/tests/auto/xmlpatternsdiagnosticsts/.gitattributes
new file mode 100644
index 0000000000..d3009543c0
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/.gitattributes
@@ -0,0 +1,6 @@
+TestSuite/DiagnosticsCatalog.xml -crlf
+TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq -crlf
+TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq -crlf
+TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq -crlf
+TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq -crlf
+TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq -crlf
diff --git a/tests/auto/xmlpatternsdiagnosticsts/.gitignore b/tests/auto/xmlpatternsdiagnosticsts/.gitignore
new file mode 100644
index 0000000000..76d03d1af0
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/.gitignore
@@ -0,0 +1,2 @@
+CandidateBaseline.xml
+tst_xmlpatternsdiagnosticsts
diff --git a/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml b/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml
new file mode 100644
index 0000000000..e965e0e206
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test-suite-result xmlns="http://www.w3.org/2005/02/query-test-XQTSResult"><implementation name="Patternist" version="0.1"><organization name="K Desktop Environment(KDE)" website="http://www.kde.org/"/><submittor name="Frans Englich" email="fenglich@trolltech.com"/><description><p>Patternist is an implementation written in C++ and with the Qt/KDE libraries. It is licensed under GNU LGPL and part of KDE, the K Desktop Environment.</p></description></implementation><syntax>XQuery</syntax><test-run dateRun="2008-06-23"><test-suite version="0.1"/></test-run><test-case name="fail-1" result="fail"/><test-case name="fail-2" result="fail"/><test-case name="fail-3" result="fail"/><test-case name="fail-4" result="fail"/><test-case name="fail-5" result="fail"/><test-case name="fail-6" result="fail"/><test-case name="fail-7" result="fail"/><test-case name="fail-8" result="fail"/><test-case name="fail-9" result="fail"/><test-case name="fail-10" result="fail"/><test-case name="fail-11" result="fail"/><test-case name="fail-12" result="fail"/><test-case name="fail-13" result="fail"/><test-case name="fail-14" result="fail"/><test-case name="fail-15" result="fail"/><test-case name="fail-16" result="fail"/><test-case name="fail-17" result="fail"/><test-case name="fail-18" result="fail"/><test-case name="fail-19" result="fail"/><test-case name="fail-20" result="fail"/><test-case name="fail-21" result="fail"/><test-case name="fail-22" result="fail"/><test-case name="fail-23" result="fail"/><test-case name="fail-24" result="fail"/><test-case name="succeed-1" result="pass"/><test-case name="succeed-2" result="pass"/><test-case name="succeed-3" result="pass"/><test-case name="succeed-4" result="pass"/><test-case name="succeed-5" result="pass"/><test-case name="succeed-6" result="pass"/><test-case name="succeed-7" result="pass"/><test-case name="succeed-8" result="pass"/><test-case name="succeed-9" result="pass"/><test-case name="succeed-10" result="pass"/><test-case name="succeed-11" result="pass"/><test-case name="succeed-12" result="pass"/><test-case name="succeed-13" result="pass"/><test-case name="succeed-14" result="pass"/></test-suite-result> \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml
new file mode 100644
index 0000000000..5a96441a72
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml
@@ -0,0 +1,1046 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="XQTSCatalog.xsl" ?>
+
+<test-suite
+ xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ CatalogDesignDate="2003-04-03"
+ version="0.1"
+ SourceOffsetPath="./"
+ ResultOffsetPath="ExpectedTestResults/"
+ XQueryQueryOffsetPath="Queries/XQuery/"
+ XQueryXQueryOffsetPath="Queries/XQueryX/"
+ XQueryFileExtension=".xq"
+ XQueryXFileExtension=".xqx"
+ xsi:schemaLocation="http://www.w3.org/2005/02/query-test-XQTSCatalog XQTSCatalog.xsd">
+
+ <test-suite-info>
+ <title>KXQTS Harness Test Suite</title>
+ <description>This collection of test cases in the XQTS format does not exist
+ for testing an XPath, XQuery or XSL-T implementation, but to verify
+ the test harness tool that runs an actual XQTS test suite. Therefore,
+ some tests intentionally fail in this test suite.</description>
+ </test-suite-info>
+
+ <citations>
+ <citation-spec name="XQuery">
+ <description last-mod="2004-10-29">XQuery 1.0: An XML Query Language</description>
+ <spec-URI>http://www.w3.org/TR/2004/WD-xquery-20041029/</spec-URI>
+ </citation-spec>
+ <citation-spec name="FuncOps">
+ <description last-mod="2004-10-29">XQuery 1.0 and XPath 2.0 Functions and Operators</description>
+ <spec-URI>http://www.w3.org/TR/2004/WD-xpath-functions-20041029/</spec-URI>
+ </citation-spec>
+ <citation-spec name="DataModel">
+ <description last-mod="2004-10-29">XQuery 1.0 and XPath 2.0 Data Model</description>
+ <spec-URI>http://www.w3.org/TR/2004/WD-xpath-datamodel-20041029/</spec-URI>
+ </citation-spec>
+ <citation-spec name="FormalSemantics">
+ <description last-mod="2004-02-20">XQuery 1.0 and XPath 2.0 Formal Semantics</description>
+ <spec-URI>http://www.w3.org/TR/2004/WD-xquery-semantics-20040220/</spec-URI>
+ </citation-spec>
+ <citation-spec name="SchemaPart2">
+ <description last-mod="2003-03-25">XML Schema Part 2: Datatypes</description>
+ <spec-URI>http://www.w3.org/TR/xmlschema-2/</spec-URI>
+ </citation-spec>
+ <citation-spec name="Schema-Errata">
+ <description last-mod="2003-03-25">XML Schema Errata</description>
+ <note>Current practice is to have one Errata document for all parts of Schema.</note>
+ <spec-URI>http://www.w3.org/2001/05/xmlschema-errata</spec-URI>
+ </citation-spec>
+ <citation-spec name="UseCases">
+ <description last-mod="2003-11-12">XML Query Use Cases</description>
+ <spec-URI>http://www.w3c.org/TR/xquery-use-cases/</spec-URI>
+ </citation-spec>
+ </citations>
+
+ <comparisons>
+ <comparison name="XML">
+ <description last-mod="2003-03-25">The XML InfoSets should be canonicalized and compared.</description>
+ </comparison>
+ <comparison name="Fragment">
+ <description last-mod="2004-10-20">A 'fragment' refers to an XML based instance which has multiple top-level elements and NO XML declaration.
+ The comparator for this should simply wrap the entire fragment in a container element and perform XML comparisson.
+ </description>
+ </comparison>
+ <comparison name="Text">
+ <description last-mod="2003-03-25">
+ Each line of non-whitespace text should match. New-line sequences
+ may vary and should be neutralized. Due to issues with the XML serialization of certain characters (e.g. '&lt;'),
+ it is not possible to simply compare the actual and expected results. Rather (as is the case with the 'Fragment' comparator)
+ the test harness should convert the results into valid XML (by adding a container element) and perform comparisson
+ on the XML canonicalized versions of the results.
+ </description>
+ </comparison>
+ <comparison name="Ignore">
+ <description last-mod="2003-03-25">
+ Only the presence/absence of this file is significant,
+ not its content.
+ </description>
+ </comparison>
+ <comparison name="Inspect">
+ <description last-mod="2003-03-25">
+ Automated comparison is not possible. the output should be
+ inspected by a human.
+ </description>
+ </comparison>
+ </comparisons>
+
+ <roles>
+ <role name="principal-data">
+ <description last-mod="2003-03-25">
+ This is the source that is handed in to the processor as the
+ initial input sequence, setting the "evaluation context" as described in XQuery chapter 2.
+ </description>
+ </role>
+ <role name="supplemental-data">
+ <description last-mod="2003-03-25">
+ These are sources that may be read by functions such as
+ fn:document() as the query is evaluated.
+ </description>
+ </role>
+ <role name="schema">
+ <description last-mod="2003-03-25">
+ These are schema definitions that may be referenced by sources
+ or in the query.
+ </description>
+ </role>
+ <role name="dtd">
+ <description last-mod="2003-03-25">
+ These are dtd definitions that may be referenced by sources
+ or in the query.
+ </description>
+ </role>
+ <role name="principal">
+ <description last-mod="2003-03-25">
+ This is an output (either text or XML) that will contain the
+ query results. If the processor invocation sequence accepts a filename for results, this name may be
+ passed, possibly prefixed by a partial directory path to allow storage of the results in a separate
+ directory tree.
+ </description>
+ </role>
+ <role name="console-log">
+ <description last-mod="2003-03-25">
+ This is an output (text file tagged .log) that will contain the
+ captured "console" output for a command-line invocation, or equivalent messages from a harness. The
+ main goal is to capture error messages that came from the processor.
+ </description>
+ <note>
+ A test lab may choose to capture console output for every test case, in which case the presence
+ of this element is a signal that the console log of this test contains messages that are significant to
+ the pass/fail determination.
+ </note>
+ </role>
+ </roles>
+
+ <scenarios>
+ <scenario name="standard">
+ <description last-mod="2005-06-10">
+ A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+ </description>
+ </scenario>
+ <scenario name="parse-error">
+ <description last-mod="2005-06-10">
+ A query this is expected to raise a parsing/syntax error at query parse time. Principal input should always be specified, even if the query doesn't have any PathExpr.
+ </description>
+ </scenario>
+ <scenario name="runtime-error">
+ <description last-mod="2005-06-10">
+ A query this is expected to raise a runtime error at query parse time. Runtime errors in this case include those raised by static typing rules. Principal input should always be specified, even if the query doesn't have any PathExpr.
+ </description>
+ </scenario>
+ </scenarios>
+
+ <sources>
+ <source ID="XQTSCatalog" FileName="XQTSCatalog.xml" Creator="XQuery Test Task Force" schema="XQTSCatalogxsd">
+ <description last-mod="2005-04-14">XQuery Test Suite Catalog</description>
+ </source>
+ <source ID="bib2" FileName="TestSources/bib2.xml" Creator="spec-authors">
+ <description last-mod="2003-03-25">Bibliography example with extra comments and PIs.</description>
+ </source>
+ <source ID="emptydoc" FileName="TestSources/emptydoc.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">Contains just a "doc" element, no comments/text/PIs.</description>
+ </source>
+ <source ID="fsx" FileName="TestSources/fsx.xml" Creator="Mike Rorke">
+ <description last-mod="2003-03-25">Data about a filesystem represented in XML.</description>
+ </source>
+ <source ID="fsx_NS" FileName="TestSources/fsx_NS.xml" Creator="Mike Rorke">
+ <description last-mod="2003-03-25">Data about a filesystem represented in XML with namespace-qualified names.</description>
+ </source>
+ <source ID="MixNS" FileName="TestSources/MixNS.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">Small tree with element names in mixed namespaces.</description>
+ <note>Use @index to identify elements precisely.</note>
+ </source>
+ <source ID="nw_Customers" FileName="TestSources/nw_Customers.xml" Creator="Kuen Siew">
+ <description last-mod="2003-03-25">Customer name/address file with some non-ASCII characters.</description>
+ </source>
+ <source ID="TopMany" FileName="TestSources/TopMany.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">Like TreeCompass, but with comments and PIs off the root. PI targets vary.</description>
+ <note>All text nodes must have non-whitespace characters.</note>
+ </source>
+ <source ID="Tree1Child" FileName="TestSources/Tree1Child.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has just one child, of an abnormal name, off the center node.</description>
+ <note>One attribute each on west and center.</note>
+ </source>
+ <source ID="Tree1Text" FileName="TestSources/Tree1Text.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has just a text node and no child element off the center node.</description>
+ </source>
+ <source ID="TreeCompass" FileName="TestSources/TreeCompass.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A tree intended to allow many kinds of path expressions.</description>
+ <note>Need multiple attributes on center, west, and south, plus @mark scattered around.</note>
+ <note>Mix of text and element children in many places, but east should have only a text node.</note>
+ <note>All text nodes must have non-whitespace characters.</note>
+ <note>Top element is far-north.</note>
+ </source>
+ <source ID="TreeEmpty" FileName="TestSources/TreeEmpty.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has just one "south" element at the top, bearing one "mark" attribute.</description>
+ </source>
+ <source ID="TreeRepeat" FileName="TestSources/TreeRepeat.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has center elements off the real center node.</description>
+ <note>Use @mark to distinguish center elements.</note>
+ <note>"Real" center must have multiple element children, some with duplicate names (south-east).</note>
+ <note>Repeating attribute names used, including same name on elements of the same name.</note>
+ <note>Comments and text nodes are strewn about. All text nodes must have non-whitespace characters.</note>
+ </source>
+ <source ID="TreeStack" FileName="TestSources/TreeStack.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has several "south" elements, some stacked within each other.</description>
+ <note>Use "mark" attributes at several levels and on all south elements.</note>
+ </source>
+ <source ID="TreeTrunc" FileName="TestSources/TreeTrunc.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">A "compass" tree that has no content at all in center or west, no attributes anywhere.</description>
+ </source>
+ <source ID="xq311A" FileName="TestSources/xq311A.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">Data that fits first example in XQuery 3.11.</description>
+ </source>
+ <source ID="xq311B" FileName="TestSources/xq311B.xml" Creator="David Marston">
+ <description last-mod="2003-03-25">Data that fits later examples in XQuery 3.11.</description>
+ </source>
+ <source ID="DupNode" FileName="TestSources/DupNode.xml" Creator="Andreas Behm">
+ <description last-mod="2005-04-26">Simple document with all node kinds</description>
+ </source>
+ <source ID="inscope" FileName="TestSources/inscope.xml" Creator="Andreas Behm">
+ <description last-mod="2005-08-26">Simple document with namespaces</description>
+ </source>
+ <source ID="nsmode" FileName="TestSources/nsmode.xml" Creator="Andreas Behm">
+ <description last-mod="2005-04-26">Source document for namespace copy modes</description>
+ </source>
+ <source ID="works" FileName="TestSources/works.xml" Creator="Carmelo Montanez">
+ <description last-mod="2005-03-04">Data for various NIST tests</description>
+ </source>
+ <source ID="works-mod" FileName="TestSources/works-mod.xml" Creator="Carmelo Montanez">
+ <description last-mod="2005-03-04">Data for various NIST tests (abbreviated, unabbreviated syntax)</description>
+ </source>
+ <source ID="lang" FileName="TestSources/lang.xml" Creator="Carmelo Montanez">
+ <description last-mod="2005-10-19">Data for fn:lang tests.</description>
+ </source>
+ <source ID="staff" FileName="TestSources/staff.xml" Creator="Carmelo Montanez">
+ <description last-mod="2005-03-04">Data for various NIST tests</description>
+ </source>
+ <source ID="acme_corp" FileName="TestSources/acme_corp.xml" Creator="Ravindranath Chennoju">
+ <description last-mod="2005-08-30">Source document for Function Declaration tests</description>
+ </source>
+ <source ID="bib" FileName="TestSources/bib.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+ </source>
+ <source ID="reviews" FileName="TestSources/reviews.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+ </source>
+ <source ID="books" FileName="TestSources/books.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+ </source>
+ <source ID="prices" FileName="TestSources/prices.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+ </source>
+ <source ID="book" FileName="TestSources/book.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query TREE use cases</description>
+ </source>
+ <source ID="report1" FileName="TestSources/report1.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query SEQ use cases</description>
+ </source>
+ <source ID="items" FileName="TestSources/items.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+ </source>
+ <source ID="bids" FileName="TestSources/bids.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+ </source>
+ <source ID="users" FileName="TestSources/users.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+ </source>
+ <source ID="string" FileName="TestSources/string.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+ </source>
+ <source ID="company-data" FileName="TestSources/company-data.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+ </source>
+ <source ID="auction" FileName="TestSources/auction.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query NS use cases</description>
+ </source>
+ <source ID="partlist" FileName="TestSources/partlist.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query PARTS use cases</description>
+ </source>
+ <source ID="sgml" FileName="TestSources/sgml.xml" Creator="XML Query WG">
+ <description last-mod="2005-02-11">Data for the the XML Query SGML use cases</description>
+ </source>
+ <source ID="atomic" FileName="TestSources/atomic.xml" Creator="Carmelo Montanez" schema="atomicxsd">
+ <description last-mod="2005-03-08">A Schema validated xml file, that contains values for data types. Can be used by any test.</description>
+ </source>
+ <source ID="orderData" FileName="TestSources/orderData.xml" Creator="Carmelo Montanez" schema="orderDataxsd">
+ <description last-mod="2005-06-01">A Schema validated xml file, that contains values for some of the order by tests generated by NIST.</description>
+ </source>
+ <source ID="id-idref" FileName="TestSources/id.xml" Creator="Carmelo Montanez">
+ <description last-mod="2005-06-01">Data for id and idref related functions.</description>
+ </source>
+ <source ID="SpecialTypes" FileName="TestSources/SpecialTypes.xml" Creator="Mike Rorke" schema="SpecialTypesXSD">
+ <description last-mod="2005-06-01">A Schema validated XML file containing certain special types e.g. interleave types, union types, anySimpleType</description>
+ </source>
+ <source ID="QNameSource" FileName="TestSources/QName-source.xml" Creator="Mike Rorke" schema="QNameSourceXSD">
+ <description last-mod="2005-09-28">A schema validated XML file containing QName and QName derived types.</description>
+ </source>
+ <source ID="notation" FileName="TestSources/notation.xml" Creator="Andreas Behm" schema="notationschema">
+ <description last-mod="2005-10-10">A Scehma validated xml file with NOTATION elements</description>
+ </source>
+ <source ID="textWithSpaces" FileName="TestSources/textWithSpaces.xml" Creator="Joanne Tong">
+ <description last-mod="2005-09-29">Data for normalize-space functions</description>
+ </source>
+ <schema ID="XQTSCatalogxsd" uri="http://www.w3.org/2005/02/query-test-XQTSCatalog" FileName="XQTSCatalog.xsd">
+ <description last-mod="2005-04-14">Schema for XQTSCatalog</description>
+ </schema>
+ <schema ID="atomicxsd" uri="http://www.w3.org/XQueryTest" FileName="TestSources/atomic.xsd">
+ <description last-mod="2005-03-08">A Schema for atomic.xml</description>
+ </schema>
+ <schema ID="orderDataxsd" uri="http://www.w3.org/XQueryTestOrderBy" FileName="TestSources/orderData.xsd">
+ <description last-mod="2005-06-01">A Schema for orderData.xml</description>
+ </schema>
+ <schema ID="SpecialTypesXSD" uri="http://typedecl" FileName="TestSources/SpecialTypes.xsd">
+ <description last-mod="2005-06-01">A Schema containing certain special types e.g. interleave types, union types, anySimpleType</description>
+ </schema>
+ <schema ID="QNameSourceXSD" uri="QNameXSD" FileName="TestSources/QName-schema.xsd">
+ <description last-mod="2005-09-28">A schema containing QName and QName derived types</description>
+ </schema>
+ <schema ID="notationschema" uri="http://www.example.com/notation" FileName="TestSources/notationschema.xsd">
+ <description last-mod="2005-10-10">A Schema for NOTATION data</description>
+ </schema>
+ <schema ID="simplexsd" uri="http://www.w3.org/XQueryTest/simple" FileName="TestSources/simple.xsd">
+ <description last-mod="2005-12-07">A schema for simple context tests</description>
+ </schema>
+ <module ID="empty-lib" FileName="TestSources/empty-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module for "modules-none" query</description>
+ </module>
+ <module ID="emptyns-lib" FileName="TestSources/emptyns-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with empty namespace</description>
+ </module>
+ <module ID="test1-lib" FileName="TestSources/test1-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Simple library module</description>
+ </module>
+ <module ID="test2-lib" FileName="TestSources/test2-lib" Creator="Carmelo Montanez">
+ <description last-mod="2006-01-19">Library module with namespace URI set to empty string.</description>
+ </module>
+ <module ID="test1a-lib" FileName="TestSources/test1a-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Simple library module</description>
+ </module>
+ <module ID="test1collide1-lib" FileName="TestSources/test1collide-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with colliding definitions</description>
+ </module>
+ <module ID="test1collide2-lib" FileName="TestSources/test1collide2-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with colliding definitions</description>
+ </module>
+ <module ID="test1c1-lib" FileName="TestSources/test1c1-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with circular includes</description>
+ </module>
+ <module ID="test2c1-lib" FileName="TestSources/test2c1-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with circular includes</description>
+ </module>
+ <module ID="context-lib" FileName="TestSources/context-lib" Creator="Mary Holstege">
+ <description last-mod="2005-12-05">Library module with interesting context</description>
+ </module>
+ <module ID="module-defs" FileName="TestSources/moduleDefs-lib" Creator="Carmelo Montanez">
+ <description last-mod="2006-01-06">Library module with definitions for various NIST tests.</description>
+ </module>
+ </sources>
+
+ <implementation-defined-items>
+ <implementation-defined-item name="expressionUnicode" spec="XQuery">
+ <description last-mod="2005-04-04">The version of Unicode that is used to construct expressions.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="collations" spec="XQuery">
+ <description last-mod="2005-04-04">The statically-known collations.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="implicitTimezone" spec="XQuery">
+ <description last-mod="2005-04-04">The implicit timezone.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="warningsMethod" spec="XQuery">
+ <description last-mod="2005-04-04">The circumstances in which warnings are raised, and the ways in which warnings are handled.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="errorsMethod" spec="XQuery">
+ <description last-mod="2005-04-04">The method by which errors are reported to the external processing environment.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="XMLVersion" spec="XQuery">
+ <description last-mod="2005-10-10">Whether the implementation is based on the rules of [XML 1.0] and [XML Names] or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied consistently by all aspects of the implementation.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="overwrittenContextComponents" spec="XQuery">
+ <description last-mod="2005-04-04">Any components of the static context or dynamic context that are overwritten or augmented by the implementation.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="axes" spec="XQuery">
+ <description last-mod="2005-04-04">Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="defaultOrderEmpty" spec="XQuery">
+ <description last-mod="2005-04-04">The default handling of empty sequences returned by an ordering key (sortspec) in an order by clause (empty least or empty greatest).</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="pragmas" spec="XQuery">
+ <description last-mod="2005-04-04">The names and semantics of any extension expressions (pragmas) recognized by the implementation.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="optionDeclarations" spec="XQuery">
+ <description last-mod="2005-04-04">The names and semantics of any option declarations recognized by the implementation.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="externalFunctionProtocols" spec="XQuery">
+ <description last-mod="2005-04-04">Protocols (if any) by which parameters can be passed to an external function, and the result of the function can returned to the invoking query.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="moduleLocationHints" spec="XQuery">
+ <description last-mod="2005-11-01">The process by which the specific modules to be imported by a module import are identified, if the Module Feature is supported (includes processing of location hints, if any.)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="staticTypingExtensions" spec="XQuery">
+ <description last-mod="2005-04-04">Any static typing extensions supported by the implementation, if the Static Typing Feature is supported.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="serializationInvocation" spec="XQuery">
+ <description last-mod="2005-04-04">The means by which serialization is invoked, if the Serialization Feature is supported.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="serializationDefaults" spec="XQuery">
+ <description last-mod="2005-10-10">The default values for the byte-order-mark, encoding, media-type, normalization-form, omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="limits" spec="XQuery">
+ <description last-mod="2005-11-01">Limits on ranges of values for various data types, as enumerated in 5.3 Data Model Conformance.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="traceDestination" spec="FuncOps">
+ <description last-mod="2005-10-10">The destination of the trace output is implementation-defined. See 4 The Trace Function.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="integerOperations" spec="FuncOps">
+ <description last-mod="2005-10-10">For xs:integer operations, implementations that support limited-precision integer operations must either raise an error [err:FOAR0002] or provide an implementation-defined mechanism that allows users to choose between raising an error and returning a result that is modulo the largest representable integer value. See 6.2 Operators on Numeric Values.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="decimalDigits" spec="FuncOps">
+ <description last-mod="2005-11-01">For xs:decimal values the number of digits of precision returned by the numeric operators is implementation-defined. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="roundOrTruncate" spec="FuncOps">
+ <description last-mod="2005-10-10">If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an implementation-defined manner. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="Unicode" spec="FuncOps">
+ <description last-mod="2005-11-01">It is implementation-defined which version of Unicode is supported by the features defined in this specification, but it is recommended that the most recent version of Unicode be used. See 7.1 String Types.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="normalizationForms" spec="FuncOps">
+ <description last-mod="2005-10-10">For 7.4.6 fn:normalize-unicode, conforming implementations must support normalization form "NFC" and may support normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They may also support other normalization forms with implementation-defined semantics.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="collationUnits" spec="FuncOps">
+ <description last-mod="2005-10-10">The ability to decompose strings into collation units suitable for substring matching is an implementation-defined property of a collation. See 7.5 Functions Based on Substring Matching.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="secondsDigits" spec="FuncOps">
+ <description last-mod="2005-10-10">All minimally conforming processors must support year values with a minimum of 4 digits (i.e., YYYY) and a minimum fractional second precision of 1 millisecond or three digits (i.e., s.sss). However, conforming processors may set larger implementation-defined limits on the maximum number of digits they support in these two situations. See 10.1.1 Limits and Precision.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="docProcessing" spec="FuncOps">
+ <description last-mod="2005-10-10">Various aspects of the processing provided by 15.5.4 fn:doc are implementation-defined. Implementations may provide external configuration options that allow any aspect of the processing to be controlled by the user.</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="additionalTypes" spec="DataModel">
+ <description last-mod="2005-04-04">Support for additional user-defined or implementation-defined types is implementation-defined. (See 2.6.1 Representation of Types)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="undefinedProperties" spec="DataModel">
+ <description last-mod="2005-04-04">Some typed values in the data model are undefined. Attempting to access an undefined property is always an error. Behavior in these cases is implementation-defined and the host language is responsible for determining the result. (See 5 Accessors)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="sequenceNormalization" spec="Serialization">
+ <description last-mod="2005-04-04">For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="outputMethods" spec="Serialization">
+ <description last-mod="2005-04-04">If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="normalizationForm" spec="Serialization">
+ <description last-mod="2005-04-04">If the value of the normalization-form form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none then the meaning of the value and it's effect is implementation-defined. (See 4 Phases of Serialization)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="additionalParams" spec="Serialization">
+ <description last-mod="2005-11-01">The effect of additional serialization parameters on the output of the serializer, where the name of such a parameter must be namespace-qualified, is implementation-defined or implementation-dependent. The extent of this effect on the output must not override the provisions of this specification. (See 3 Serialization Parameters)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="encodingPhase" spec="Serialization">
+ <description last-mod="2005-04-04">The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined. The serializer is not required to support such an option. (See 4 Phases of Serialization)</description>
+ </implementation-defined-item>
+ <implementation-defined-item name="CDATASerialization" spec="Serialization">
+ <description last-mod="2005-04-04">An serializer may provide an implementation-defined mechanism to place CDATA sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter)</description>
+ </implementation-defined-item>
+ </implementation-defined-items>
+
+ <features>
+ <feature name="Minimal Conformance"/>
+ <feature name="Schema Import"/>
+ <feature name="Schema Validation"/>
+ <feature name="Static Typing"/>
+ <feature name="Static Typing Extensions"/>
+ <feature name="Full Axis"/>
+ <feature name="Module"/>
+ <feature name="Serialization"/>
+ <feature name="Trivial XML Embedding"/>
+ </features>
+
+ <context-properties>
+ <context-property name="Statically known namespaces" context-type="static"/>
+ <context-property name="Default element/type namespace" context-type="static"/>
+ <context-property name="Default function namespace" context-type="static"/>
+ <context-property name="In-scope schema types" context-type="static"/>
+ <context-property name="In-scope element declarations" context-type="static"/>
+ <context-property name="In-scope attribute declarations" context-type="static"/>
+ <context-property name="In-scope variables" context-type="static"/>
+ <context-property name="Context item static type" context-type="static"/>
+ <context-property name="Function signatures" context-type="static"/>
+ <context-property name="Statically known collations" context-type="static"/>
+ <context-property name="Default collation" context-type="static"/>
+ <context-property name="Construction mode" context-type="static"/>
+ <context-property name="Ordering mode" context-type="static"/>
+ <context-property name="Default order for empty sequences" context-type="static"/>
+ <context-property name="Boundary-space policy" context-type="static"/>
+ <context-property name="Copy-namespaces mode" context-type="static"/>
+ <context-property name="Base URI" context-type="static"/>
+ <context-property name="Statically known documents" context-type="static"/>
+ <context-property name="Statically known collections" context-type="static"/>
+ <context-property name="Statically known default collection type" context-type="static"/>
+ <context-property name="Context item" context-type="dynamic"/>
+ <context-property name="Context position" context-type="dynamic"/>
+ <context-property name="Context size" context-type="dynamic"/>
+ <context-property name="Variable values" context-type="dynamic"/>
+ <context-property name="Function implementations" context-type="dynamic"/>
+ <context-property name="Current dateTime" context-type="dynamic"/>
+ <context-property name="Implicit timezone" context-type="dynamic"/>
+ <context-property name="Available documents" context-type="dynamic"/>
+ <context-property name="Available collections" context-type="dynamic"/>
+ <context-property name="Default collection" context-type="dynamic"/>
+ </context-properties>
+
+ <test-group name="ShouldFail">
+ <GroupInfo>
+ <title>Failing Tests</title>
+ <description>These tests should fail -- it's intentional.</description>
+ </GroupInfo>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-1"
+ FilePath="ShouldFail/"
+ scenario="standard">
+ <description>
+ The query is a syntax error, but the test-case requires a pass.
+ </description>
+
+ <query name="fail-1" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">fail-1.txt</output-file>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-2"
+ FilePath="ShouldFail/"
+ scenario="standard">
+ <description>
+ The query is a dynamic error due to call to fn:error(), but the test-case requires a pass.
+ </description>
+
+ <query name="fail-2" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">fail-2.txt</output-file>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-3"
+ FilePath="ShouldFail/"
+ scenario="parse-error">
+ <description>
+ The query evaluates to a xs:string, but the test-case requires
+ a parse-error with error code XPST0003.
+ </description>
+
+ <query name="fail-3" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>XPST0003</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-4"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query evaluates to a xs:string, but the test-case requires
+ a runtime-error with error code FORG0006.
+ </description>
+
+ <query name="fail-4" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>FORG0006</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-5"
+ FilePath="ShouldFail/"
+ scenario="parse-error">
+ <description>
+ The query evaluates to a parse error with error code XPST0003, but the
+ test case required a parse error with code XPST0081.
+ </description>
+
+ <query name="fail-5" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>XPST0081</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-6"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query evaluates to a parse error with error code XPST0003, but the
+ test case required a runtime error with code FORG0006.
+ </description>
+
+ <query name="fail-6" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>FORG0006</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-7"
+ FilePath="ShouldFail/"
+ scenario="parse-error">
+ <description>
+ The query evaluates to a dynamic error with error code FOER0000, but the
+ test case required a parse error with code FOER0000.
+ </description>
+
+ <query name="fail-7" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>FOER0000</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-8"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query evaluates to a dynamic error with error code FOER0000, but the
+ test case required a parse error with code FORG0006.
+ </description>
+
+ <query name="fail-8" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>FORG0006</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-9"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query evaluates to an xs:string, but none of the baselines match.
+ </description>
+
+ <query name="fail-9" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-9-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-9-2.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-9-3.txt</output-file>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-10"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query evaluates to an xs:string, but the baseline doesn't match.
+ </description>
+
+ <query name="fail-10" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-10.txt</output-file>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-11"
+ FilePath="ShouldFail/"
+ scenario="parse-error">
+ <description>
+ The query contains a parse error, but none of the baselines match.
+ </description>
+
+ <query name="fail-11" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-11-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-11-2.txt</output-file>
+ <expected-error>FOER0000</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-12"
+ FilePath="ShouldFail/"
+ scenario="runtime-error">
+ <description>
+ The query contains a runtime error due to call to fn:error(), but none of the baselines match.
+ </description>
+
+ <query name="fail-12" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-12-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-12-2.txt</output-file>
+ <expected-error>FORG0006</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-13"
+ FilePath="ShouldFail/"
+ scenario="parse-error">
+ <description>
+ The test-case requires a parse error with error code XPST0003,
+ but the query file does not exist.
+ </description>
+
+ <query name="DoesNotExist" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>XPST0003</expected-error>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="fail-14"
+ FilePath="ShouldFail/"
+ scenario="standard">
+ <description>
+ The query evaluates to a xs:string literal, but the specified
+ baseline file does not exist.
+ </description>
+
+ <query name="fail-14" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <output-file role="principal" compare="Text">fail-DOESNOTEXIST.txt</output-file>
+
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-15" FilePath="ShouldFail/"
+ scenario="standard" Creator="Frans Englich">
+ <description>An "Ignore" baseline with a query that generates a runtime error.</description>
+ <query name="fail-15" date="2006-10-25"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Ignore"/>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-16" FilePath="ShouldFail/"
+ scenario="standard" Creator="Frans Englich">
+ <description>An "Ignore" baseline with a query that generates a parse error.</description>
+ <query name="fail-16" date="2006-10-25"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Ignore"/>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-17" FilePath="ShouldFail/"
+ scenario="standard" Creator="Frans Englich" >
+ <description>Space is significant.</description>
+ <query name="fail-17" date="2007-06-07"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-3.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-18" FilePath="ShouldFail/"
+ scenario="runtime-error" Creator="Frans Englich" >
+ <description>Test that XML documents that differs on the top level, are flagged(type being runtime-error).</description>
+ <query name="fail-18" date="2007-10-08"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-18.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-19" FilePath="ShouldFail/"
+ scenario="runtime-error" Creator="Frans Englich" >
+ <description>Test that XML documents that differs on the top level, are flagged(type being runtime-error, comparing as Fragment).</description>
+ <query name="fail-18" date="2007-10-08"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Fragment">fail-18.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-20" FilePath="ShouldFail/"
+ scenario="standard" Creator="Frans Englich" >
+ <description>Test that XML documents that differs on the top level, are flagged(type being standard, comparing as XML).</description>
+ <query name="fail-18" date="2007-10-08"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-18.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-21" FilePath="ShouldFail/"
+ scenario="standard" Creator="Frans Englich" >
+ <description>Test that XML documents that differs on the top level, are flagged(type being standard, comparing as fragment).</description>
+ <query name="fail-18" date="2007-10-08"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Fragment">fail-18.txt</output-file>
+ </test-case>
+
+ <test-case Creator="Frans Englich" is-XPath2="false" name="fail-22" FilePath="ShouldFail/" scenario="standard">
+ <description>Top elements differing in name, should fail.</description>
+ <query name="fail-22" date="2007-10-08+01:00"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-22.txt</output-file>
+ </test-case>
+
+ <test-case Creator="Frans Englich" is-XPath2="false" name="fail-23" FilePath="ShouldFail/" scenario="standard">
+ <description>Attributes differing with the XML prefix, should fail.</description>
+ <query name="fail-23" date="2007-10-08+01:00"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-23.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="false" name="fail-24" FilePath="ShouldFail/"
+ scenario="runtime-error" Creator="Frans Englich" >
+ <description>Test that XML documents that differs on the top level, are flagged(type being runtime-error, comparing as Fragment).</description>
+ <query name="fail-18" date="2007-10-08"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="XML">fail-18.txt</output-file>
+ </test-case>
+
+ </test-group>
+
+ <test-group name="ShouldSucceed">
+ <GroupInfo>
+ <title>Succeeding Tests</title>
+ <description>These tests should succeed.</description>
+ </GroupInfo>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-1"
+ FilePath="ShouldSucceed/"
+ scenario="standard">
+ <description>A 'success' test where the query, which is a
+ string literal, evaluates to a string, which must match the baseline.
+ </description>
+
+ <query name="succeed-1" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-1.txt</output-file>
+
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="false"
+ name="succeed-2"
+ FilePath="ShouldSucceed/"
+ scenario="standard">
+ <description>
+ A 'success' test where multiple output baselines exists.
+ </description>
+
+ <query name="succeed-2" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <output-file role="principal" compare="Text">succeed-2-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-2-2.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-2-3.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-2-4.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-2-5.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-2-6.txt</output-file>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-3"
+ FilePath="ShouldSucceed/"
+ scenario="parse-error">
+ <description>
+ A 'parse-error' specifying error code XPST0003,
+ and where the query also is that; a syntax error.
+ </description>
+
+ <query name="succeed-3" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <expected-error>XPST0003</expected-error>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-4"
+ FilePath="ShouldSucceed/"
+ scenario="runtime-error">
+ <description>
+ A 'runtime-error' specifying error code FOER0000,
+ and where the query, containing a call to fn:error(), also results in that.
+ </description>
+
+ <query name="succeed-4" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <expected-error>FOER0000</expected-error>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-5"
+ FilePath="ShouldSucceed/"
+ scenario="runtime-error">
+ <description>
+ A 'runtime-error' specifying error code XPTY0004,
+ and where the query, contains an invalid operator mapping. While the test case
+ is specified as a runtime error, some implementations detects it at compile time, but
+ should nevertheless flag it as a passed test case(even though it failed at compile time
+ instead of runtime).
+ </description>
+
+ <query name="succeed-5" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <expected-error>XPTY0004</expected-error>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-6"
+ FilePath="ShouldSucceed/"
+ scenario="parse-error">
+ <description>
+ The query results in a parse error with error code XPST0003, while the test-case contains
+ many baselines, one of them the error code XPST0003.
+ </description>
+ <query name="succeed-6" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <output-file role="principal" compare="Text">succeed-6-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-6-2.txt</output-file>
+ <expected-error>XPTY0004</expected-error>
+ <expected-error>XPST0003</expected-error>
+ </test-case>
+
+ <test-case
+ Creator="Frans Englich"
+ is-XPath2="true"
+ name="succeed-7"
+ FilePath="ShouldSucceed/"
+ scenario="runtime-error">
+ <description>
+ The query results in a runtime error with error code FOER0000, while the test-case contains
+ many baselines, one of them the error code FOER0000.
+ </description>
+
+ <query name="succeed-7" date="2006-04-06"/>
+
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+
+ <output-file role="principal" compare="Text">succeed-7-1.txt</output-file>
+ <output-file role="principal" compare="Text">succeed-7-2.txt</output-file>
+ <expected-error>XPTY0004</expected-error>
+ <expected-error>FOER0000</expected-error>
+ </test-case>
+
+ <test-case is-XPath2="false" name="succeed-8" FilePath="ShouldSucceed/" scenario="standard" Creator="Frans Englich">
+ <description>A 'standard' test with multiple baselines that caused an assert crash in KXQTS.</description>
+ <query name="succeed-8" date="2006-04-19"/>
+ <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-8.txt</output-file>
+ <expected-error>XQST0046</expected-error>
+ </test-case>
+
+ <test-case is-XPath2="true" name="succeed-9" FilePath="ShouldSucceed/" scenario="standard" Creator="Frans Englich">
+ <description>A test whose comparison method is 'Fragment'. Caused assert in KXQTS.</description>
+ <query name="succeed-9" date="2006-04-19"/>
+ <input-file role="principal-data" variable="input-context">bib2</input-file>
+ <output-file role="principal" compare="Text">succeed-9.txt</output-file>
+ </test-case>
+ <test-case is-XPath2="true" name="succeed-10" FilePath="ShouldSucceed/" scenario="runtime-error" Creator="Frans Englich">
+ <description>A test which accepts any runtime error code, by specifying "*".</description>
+ <query name="succeed-10" date="2006-04-19"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <expected-error>*</expected-error>
+ </test-case>
+ <test-case is-XPath2="false" name="succeed-11" FilePath="ShouldSucceed/"
+ scenario="standard" Creator="Frans Englich">
+ <description>A 'standard' test that accept output, a particular error code, plus any error code(yes, it makes no sense).</description>
+ <query name="succeed-11" date="2006-04-19"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Text">succeed-11.txt</output-file>
+ <expected-error>XQST0038</expected-error>
+ <expected-error>*</expected-error>
+ </test-case>
+
+ <test-case is-XPath2="false" name="succeed-12" FilePath="ShouldSucceed/"
+ scenario="standard" Creator="Frans Englich">
+ <description>An "Ignore" baseline with a query that generates output.</description>
+ <query name="succeed-12" date="2006-10-25"/>
+ <input-file role="principal-data" variable="input-context">emptydoc</input-file>
+ <output-file role="principal" compare="Ignore"/>
+ </test-case>
+
+ <test-case is-XPath2="true" name="succeed-13" FilePath="ShouldSucceed/" scenario="runtime-error" Creator="Frans Englich">
+ <description>The scenario is runtime-error despite it not having an error baseline, and despite that we succeed on a non-error baseline. This could the driver not handle.</description>
+ <query name="succeed-13" date="2007-10-23"/>
+ <output-file compare="Text" role="principal">succeed-13.txt</output-file>
+ </test-case>
+
+ <test-case is-XPath2="true" name="succeed-14" FilePath="ShouldSucceed/" scenario="standard" Creator="Frans Englich">
+ <description>Check that an XML prolog is not considered a processing instruction when comparing.</description>
+ <query name="succeed-14" date="2008-02-19"/>
+ <output-file compare="XML" role="principal">succeed-14.txt</output-file>
+ </test-case>
+
+ </test-group>
+
+</test-suite>
+<!-- // vim: et:ts=2:sw=2:sts=2
+-->
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt
new file mode 100644
index 0000000000..dcaa1e1262
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt
@@ -0,0 +1 @@
+This is the expected output \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt
new file mode 100644
index 0000000000..638e013b04
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt
@@ -0,0 +1 @@
+This is the expected output(fail-2) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt
new file mode 100644
index 0000000000..a06c409f19
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt
@@ -0,0 +1 @@
+<e> </e>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt
new file mode 100644
index 0000000000..3c7d064c14
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt
@@ -0,0 +1 @@
+312 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt
new file mode 100644
index 0000000000..9d239ff807
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt
@@ -0,0 +1 @@
+321 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt
new file mode 100644
index 0000000000..d800886d9c
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt
@@ -0,0 +1 @@
+123 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt
new file mode 100644
index 0000000000..9d239ff807
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt
@@ -0,0 +1 @@
+321 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt
new file mode 100644
index 0000000000..3c7d064c14
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt
@@ -0,0 +1 @@
+312 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt
new file mode 100644
index 0000000000..565f1b06a1
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt
@@ -0,0 +1 @@
+231 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt
new file mode 100644
index 0000000000..dd1ec209f3
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt
@@ -0,0 +1 @@
+132 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt
new file mode 100644
index 0000000000..3c7d064c14
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt
@@ -0,0 +1 @@
+312 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt
new file mode 100644
index 0000000000..680ad50f44
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt
@@ -0,0 +1 @@
+This XQuery query/XPath expression is a xs:string literal. \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt
@@ -0,0 +1 @@
+1
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt
@@ -0,0 +1 @@
+1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt
new file mode 100644
index 0000000000..09a420c71f
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<!-- This document must have the XML prolog above. -->
+<doc/>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt
new file mode 100644
index 0000000000..b410461e15
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt
@@ -0,0 +1 @@
+2 3 1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt
new file mode 100644
index 0000000000..5a03540bfb
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt
@@ -0,0 +1 @@
+1 3 2 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt
new file mode 100644
index 0000000000..354bbaf399
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt
@@ -0,0 +1 @@
+3 1 2 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt
new file mode 100644
index 0000000000..0f847fe0d5
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt
@@ -0,0 +1 @@
+2 1 3 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt
new file mode 100644
index 0000000000..703ca85bc6
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt
@@ -0,0 +1 @@
+1 2 3 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt
new file mode 100644
index 0000000000..df610b0b02
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt
@@ -0,0 +1 @@
+3 2 1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt
new file mode 100644
index 0000000000..d800886d9c
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt
@@ -0,0 +1 @@
+123 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt
new file mode 100644
index 0000000000..9d239ff807
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt
@@ -0,0 +1 @@
+321 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt
new file mode 100644
index 0000000000..9d239ff807
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt
@@ -0,0 +1 @@
+321 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt
new file mode 100644
index 0000000000..d800886d9c
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt
@@ -0,0 +1 @@
+123 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt
new file mode 100644
index 0000000000..f32a5804e2
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt
@@ -0,0 +1 @@
+true \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt
@@ -0,0 +1 @@
+1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq
new file mode 100644
index 0000000000..744f6c25dc
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq
new file mode 100644
index 0000000000..7629350a2a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq
@@ -0,0 +1 @@
+"This query is fully valid, and consists of one string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq
new file mode 100644
index 0000000000..744f6c25dc
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq
new file mode 100644
index 0000000000..6f4fbc4f60
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq
@@ -0,0 +1 @@
+error() \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq
new file mode 100644
index 0000000000..480eb99e06
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq
@@ -0,0 +1 @@
+"This query is fully valid, and consists of one xs:string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq
new file mode 100644
index 0000000000..d8248187a9
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq
@@ -0,0 +1,2 @@
+xquery version "1.0";
+fn:error()
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq
new file mode 100644
index 0000000000..6b0185bd35
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq
@@ -0,0 +1,2 @@
+xquery version "1.0";
+"a parse error
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq
new file mode 100644
index 0000000000..10a7e703b2
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq
@@ -0,0 +1 @@
+<e/>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq
new file mode 100644
index 0000000000..94cd6cde3e
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq
@@ -0,0 +1 @@
+<a/>, <b/>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq
new file mode 100644
index 0000000000..6f4fbc4f60
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq
@@ -0,0 +1 @@
+error() \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq
new file mode 100644
index 0000000000..7629350a2a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq
@@ -0,0 +1 @@
+"This query is fully valid, and consists of one string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq
new file mode 100644
index 0000000000..7629350a2a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq
@@ -0,0 +1 @@
+"This query is fully valid, and consists of one string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq
new file mode 100644
index 0000000000..744f6c25dc
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq
new file mode 100644
index 0000000000..744f6c25dc
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq
new file mode 100644
index 0000000000..6f4fbc4f60
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq
@@ -0,0 +1 @@
+error() \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq
new file mode 100644
index 0000000000..6f4fbc4f60
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq
@@ -0,0 +1 @@
+error() \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq
new file mode 100644
index 0000000000..7629350a2a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq
@@ -0,0 +1 @@
+"This query is fully valid, and consists of one string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq
new file mode 100644
index 0000000000..ab4c980fe6
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq
@@ -0,0 +1 @@
+"This XQuery query/XPath expression is a xs:string literal." \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq
new file mode 100644
index 0000000000..529429cce4
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq
@@ -0,0 +1 @@
+"This query yields a type error, XPTY0004." + 1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq
new file mode 100644
index 0000000000..90fde74bab
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq
@@ -0,0 +1,3 @@
+xquery version "1.0";
+declare default collation "xspanish";
+1
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq
new file mode 100644
index 0000000000..5125f534b5
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq
@@ -0,0 +1,2 @@
+xquery version "1.0";
+"This query evaluates to arbitrary output", 1, 2, 3
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq
new file mode 100644
index 0000000000..f33dfa25aa
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq
@@ -0,0 +1 @@
+1
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq
new file mode 100644
index 0000000000..a9d9741ae6
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq
@@ -0,0 +1,2 @@
+<!-- This document must have the XML prolog above. -->,
+<doc/>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq
new file mode 100644
index 0000000000..ea815e2489
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq
@@ -0,0 +1,2 @@
+unordered{1, 2, 3}
+
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq
new file mode 100644
index 0000000000..d050b9e2f5
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error)
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq
new file mode 100644
index 0000000000..f62b454cb0
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq
@@ -0,0 +1 @@
+error()
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq
new file mode 100644
index 0000000000..648bf79435
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq
@@ -0,0 +1 @@
+"Can't multiply an xs:string with an xs:integer." * 1 \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq
new file mode 100644
index 0000000000..744f6c25dc
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq
@@ -0,0 +1 @@
+"This xs:string literal is not terminated(syntax error) \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq
new file mode 100644
index 0000000000..6f4fbc4f60
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq
@@ -0,0 +1 @@
+error() \ No newline at end of file
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq
new file mode 100644
index 0000000000..13589a4d79
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq
@@ -0,0 +1,2 @@
+declare base-uri "abc";
+ends-with(fn:static-base-uri(), "abc")
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq
new file mode 100644
index 0000000000..f33dfa25aa
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq
@@ -0,0 +1 @@
+1
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml
new file mode 100644
index 0000000000..e7c0e60d8e
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- this file is a copy of bib.xml; just adds a few comments and PI nodes for testing -->
+<!-- Comment 1 -->
+<?PI1 Processing Instruction 1?>
+<bib>
+ <book year="1994">
+ <title>TCP/IP Illustrated</title>
+ <author><last>Stevens</last><first>W.</first></author>
+ <publisher>Addison-Wesley</publisher>
+ <price> 65.95</price>
+ </book>
+
+ <book year="1992">
+ <title>Advanced Programming in the Unix environment</title>
+ <author><last>Stevens</last><first>W.</first></author>
+ <publisher>Addison-Wesley</publisher>
+ <price>65.95</price>
+ </book>
+
+ <book year="2000">
+ <title>Data on the Web</title>
+ <author><last>Abiteboul</last><first>Serge</first></author>
+ <author><last>Buneman</last><first>Peter</first></author>
+ <author><last>Suciu</last><first>Dan</first></author>
+ <publisher>Morgan Kaufmann Publishers</publisher>
+ <price> 39.95</price>
+ </book>
+
+ <book year="1999">
+ <title>The Economics of Technology and Content for Digital TV</title>
+ <editor>
+ <last>Gerbarg</last><first>Darcy</first>
+ <affiliation>CITI</affiliation>
+ </editor>
+ <publisher>Kluwer Academic Publishers</publisher>
+ <price>129.95</price>
+ </book>
+</bib>
+<!-- Comment 2 -->
+<?PI2 Processing Instruction 2?>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml
new file mode 100644
index 0000000000..69d62f2c9a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh
new file mode 100755
index 0000000000..13b3d516a1
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+set p4Where `p4 where //depot/autotests/4.4/tests/auto/xmlpatternsxqts/XQTS/XQTSCatalog.xsd`
+xmllint --xinclude --noout --schema $4 DiagnosticsCatalog.xml
diff --git a/tests/auto/xmlpatternsdiagnosticsts/test/test.pro b/tests/auto/xmlpatternsdiagnosticsts/test/test.pro
new file mode 100644
index 0000000000..aeff89649a
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/test/test.pro
@@ -0,0 +1,32 @@
+load(qttest_p4)
+SOURCES += tst_xmlpatternsdiagnosticsts.cpp \
+ ../../qxmlquery/TestFundament.cpp
+
+include (../../xmlpatterns.pri)
+
+TARGET = tst_xmlpatternsdiagnosticsts
+DESTDIR = ..
+win32 {
+ CONFIG(debug, debug|release): DESTDIR = ../debug
+ else: DESTDIR = ../release
+}
+
+contains(QT_CONFIG, xmlpatterns) {
+HEADERS += ../../xmlpatternsxqts/test/tst_suitetest.h
+SOURCES += ../../xmlpatternsxqts/test/tst_suitetest.cpp
+LIBS += -l$$XMLPATTERNS_SDK
+}
+
+QT += xml
+
+INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternsxqts/lib/ \
+ $$(QTDIR)/include/QtXmlPatterns/private \
+ $$(QTSRCDIR)/tests/auto/xmlpatternsxqts/test \
+ ../../xmlpatternsxqts/test \
+ ../../xmlpatternsxqts/lib
+
+wince*: {
+ catalog.sources = TestSuite Baseline.xml
+ catalog.path = .
+ DEPLOYMENT += catalog
+}
diff --git a/tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp b/tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp
new file mode 100644
index 0000000000..60037f9d18
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+#ifdef QTEST_XMLPATTERNS
+
+#include "tst_suitetest.h"
+
+/*!
+ \class tst_XmlPatternsDiagnosticsTS
+ \internal
+ \since 4.5
+ \brief Test QtXmlPatterns test suite driver in tests/auto/xmlpatternsxqts/lib/.
+ */
+class tst_XmlPatternsXSLTS : public tst_SuiteTest
+{
+ Q_OBJECT
+public:
+ tst_XmlPatternsXSLTS();
+protected:
+ virtual void catalogPath(QString &write) const;
+};
+
+tst_XmlPatternsXSLTS::tst_XmlPatternsXSLTS() : tst_SuiteTest(false, true)
+{
+}
+
+void tst_XmlPatternsXSLTS::catalogPath(QString &write) const
+{
+ write = QLatin1String("TestSuite/DiagnosticsCatalog.xml");
+}
+
+QTEST_MAIN(tst_XmlPatternsXSLTS)
+
+#include "tst_xmlpatternsdiagnosticsts.moc"
+#else
+QTEST_NOOP_MAIN
+#endif
+
+// vim: et:ts=4:sw=4:sts=4
diff --git a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro
new file mode 100644
index 0000000000..e90b335d76
--- /dev/null
+++ b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+
+SUBDIRS = ../xmlpatternsxqts test