summaryrefslogtreecommitdiffstats
path: root/tests/auto/xml/sax/qxmlsimplereader
diff options
context:
space:
mode:
authorJo Asplin <jo.asplin@nokia.com>2011-09-06 10:01:38 +0200
committerJo Asplin <jo.asplin@nokia.com>2011-09-06 10:31:40 +0200
commit665e4ec0ec959a12a6b66cdd0533bd40b29cd56d (patch)
tree98dd4ebb79d76067c3ec6dca15455e29fa35baae /tests/auto/xml/sax/qxmlsimplereader
parent48ba459580c9e4ce28dbb2c3ce433175148da5a1 (diff)
Moved xml autotests into new directory structure
Task-number: QTBUG-21260 Change-Id: I7bc30227d4e71e8783f274dbfa758399dca546d4 Reviewed-on: http://codereview.qt.nokia.com/4146 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/xml/sax/qxmlsimplereader')
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/.gitattributes8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/.gitignore1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/encodings/doc_euc-jp.xml78
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/encodings/doc_iso-2022-jp.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/encodings/doc_little-endian.xmlbin0 -> 3186 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-16.xmlbin0 -> 3186 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-8.xml77
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh43
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp123
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp455
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.h64
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro15
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro19
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp775
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml.ref14
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml0
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml.ref14
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml.refbin0 -> 309 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml.refbin0 -> 309 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml.ref5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml.ref3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml.ref6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml.ref11
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml.ref4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/null.ent0
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.ent0
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.ent4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.entbin0 -> 4 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml.ref11
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.entbin0 -> 54 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml.ref11
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.ent0
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml.ref14
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml.ref12
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.entbin0 -> 12 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml13
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml.ref47
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml14
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml.ref47
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml.ref16
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.ent0
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-1.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-2.ent0
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-1.ent4
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-2.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-1.ent3
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-2.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml.ref10
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.ent4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.ent4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.ent5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.ent4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml.ref8
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.ent5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.ent4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.ent5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml.ref12
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.ent2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.ent3
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml.ref7
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-1.ent3
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-2.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml.ref11
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml.ref11
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml.ref11
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml.ref20
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xmlbin0 -> 124 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xmlbin0 -> 132 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xmlbin0 -> 140 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml.ref20
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml.refbin0 -> 312 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml.ref15
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml.ref7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.bak5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.refbin0 -> 381 bytes
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml.ref17
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.ent1
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml.ref12
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml7
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml.ref8
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml.ref11
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml.ref10
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml.ref9
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml.ref8
773 files changed, 5654 insertions, 0 deletions
diff --git a/tests/auto/xml/sax/qxmlsimplereader/.gitattributes b/tests/auto/xml/sax/qxmlsimplereader/.gitattributes
new file mode 100644
index 0000000000..5521239fbe
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/.gitattributes
@@ -0,0 +1,8 @@
+encodings/doc_euc-jp.xml -crlf
+encodings/doc_utf-8.xml -crlf
+xmldocs/* -crlf
+xmldocs/*/* -crlf
+xmldocs/*/*/* -crlf
+xmldocs/*/*/*/* -crlf
+xmldocs/*/*/*/*/* -crlf
+xmldocs/*/*/*/*/*/* -crlf
diff --git a/tests/auto/xml/sax/qxmlsimplereader/.gitignore b/tests/auto/xml/sax/qxmlsimplereader/.gitignore
new file mode 100644
index 0000000000..31b604faaf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/.gitignore
@@ -0,0 +1 @@
+tst_qxmlsimplereader
diff --git a/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_euc-jp.xml b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_euc-jp.xml
new file mode 100644
index 0000000000..887ab5ec30
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_euc-jp.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="euc-jp"?>
+<!DOCTYPE SYSTEM "weekly-euc-jp.dtd">
+<!-- 󥵥ץ -->
+<>
+ <ǯ>
+ <ǯ>1997</ǯ>
+ <>1</>
+ <>1</>
+ </ǯ>
+
+ <̾>
+ <></>
+ <̾>Ϻ</̾>
+ </̾>
+
+ <̳ꥹ>
+ <̳>
+ <̳̾>XMLǥκ</̳̾>
+ <̳>X3355-23</̳>
+ <>
+ <Ѥ깩>1600</Ѥ깩>
+ <ӹ>320</ӹ>
+ <Ѥ깩>160</Ѥ깩>
+ <ӹ>24</ӹ>
+ </>
+ <ͽܥꥹ>
+ <ͽ>
+ <P>XMLǥδܻͤκ</P>
+ </ͽ>
+ </ͽܥꥹ>
+ <»ܻꥹ>
+ <»ܻ>
+ <P>XMLǥδܻͤκ</P>
+ </»ܻ>
+ <»ܻ>
+ <P>¾ʤεǽĴ</P>
+ </»ܻ>
+ </»ܻꥹ>
+ <Ĺؤꥹ>
+ <Ĺؤ>
+ <P>äˤʤ</P>
+ </Ĺؤ>
+ </Ĺؤꥹ>
+ <к>
+ <P>XMLȤϲ狼ʤ</P>
+ </к>
+ </̳>
+
+ <̳>
+ <̳̾>󥸥γȯ</̳̾>
+ <̳>S8821-76</̳>
+ <>
+ <Ѥ깩>120</Ѥ깩>
+ <ӹ>6</ӹ>
+ <Ѥ깩>32</Ѥ깩>
+ <ӹ>2</ӹ>
+ </>
+ <ͽܥꥹ>
+ <ͽ>
+ <P><A href="http://www.goo.ne.jp">goo</A>εǽĴ٤Ƥߤ</P>
+ </ͽ>
+ </ͽܥꥹ>
+ <»ܻꥹ>
+ <»ܻ>
+ <P>ˡɤ󥸥󤬤뤫Ĵ</P>
+ </»ܻ>
+ </»ܻꥹ>
+ <Ĺؤꥹ>
+ <Ĺؤ>
+ <P>ȯ򤹤ΤϤɤʤΤǡYahoo!Ʋ</P>
+ </Ĺؤ>
+ </Ĺؤꥹ>
+ <к>
+ <P>󥸥Ǽ֤餻뤳ȤǤʤĴ</P>
+ </к>
+ </̳>
+ </̳ꥹ>
+</>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_iso-2022-jp.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_iso-2022-jp.xml.ref
new file mode 100644
index 0000000000..28dcdd98c4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_iso-2022-jp.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='iso-2022-jp'")
+ fatalError(exception={columnNumber=11, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_little-endian.xml b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_little-endian.xml
new file mode 100644
index 0000000000..81f72e59e8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_little-endian.xml
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-16.xml b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-16.xml
new file mode 100644
index 0000000000..6c8622aa43
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-16.xml
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-8.xml b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-8.xml
new file mode 100644
index 0000000000..402c163c5f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/encodings/doc_utf-8.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!-- 週報サンプル -->
+<週報>
+ <年月週>
+ <年度>1997</年度>
+ <月度>1</月度>
+ <週>1</週>
+ </年月週>
+
+ <氏名>
+ <氏>山田</氏>
+ <名>太郎</名>
+ </氏名>
+
+ <業務報告リスト>
+ <業務報告>
+ <業務名>XMLエディターの作成</業務名>
+ <業務コード>X3355-23</業務コード>
+ <工数管理>
+ <見積もり工数>1600</見積もり工数>
+ <実績工数>320</実績工数>
+ <当月見積もり工数>160</当月見積もり工数>
+ <当月実績工数>24</当月実績工数>
+ </工数管理>
+ <予定項目リスト>
+ <予定項目>
+ <P>XMLエディターの基本仕様の作成</P>
+ </予定項目>
+ </予定項目リスト>
+ <実施事項リスト>
+ <実施事項>
+ <P>XMLエディターの基本仕様の作成</P>
+ </実施事項>
+ <実施事項>
+ <P>競合他社製品の機能調査</P>
+ </実施事項>
+ </実施事項リスト>
+ <上長への要請事項リスト>
+ <上長への要請事項>
+ <P>特になし</P>
+ </上長への要請事項>
+ </上長への要請事項リスト>
+ <問題点対策>
+ <P>XMLとは何かわからない。</P>
+ </問題点対策>
+ </業務報告>
+
+ <業務報告>
+ <業務名>検索エンジンの開発</業務名>
+ <業務コード>S8821-76</業務コード>
+ <工数管理>
+ <見積もり工数>120</見積もり工数>
+ <実績工数>6</実績工数>
+ <当月見積もり工数>32</当月見積もり工数>
+ <当月実績工数>2</当月実績工数>
+ </工数管理>
+ <予定項目リスト>
+ <予定項目>
+ <P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
+ </予定項目>
+ </予定項目リスト>
+ <実施事項リスト>
+ <実施事項>
+ <P>更に、どういう検索エンジンがあるか調査する</P>
+ </実施事項>
+ </実施事項リスト>
+ <上長への要請事項リスト>
+ <上長への要請事項>
+ <P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
+ </上長への要請事項>
+ </上長への要請事項リスト>
+ <問題点対策>
+ <P>検索エンジンで車を走らせることができない。(要調査)</P>
+ </問題点対策>
+ </業務報告>
+ </業務報告リスト>
+</週報>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
new file mode 100755
index 0000000000..ae2a5ffb5c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#############################################################################
+##
+## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is the build configuration utility of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## GNU Lesser General Public License Usage
+## 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.1, 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.
+##
+## Other Usage
+## Alternatively, this file may be used in accordance with the terms and
+## conditions contained in a signed written agreement between you and Nokia.
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+for k in `find xmldocs -name \*.xml`; do echo $k...; ./parser/parser $k; done
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
new file mode 100644
index 0000000000..05d9ce6754
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+#include <qfile.h>
+#include <qstring.h>
+#include <qtextstream.h>
+
+#include "parser.h"
+
+static QTextStream qout(stdout, QIODevice::WriteOnly);
+static QTextStream qerr(stderr, QIODevice::WriteOnly);
+
+static void usage()
+{
+ qerr << "Usage: parse [-report-whitespace-only-chardata] [-report-start-end-entity] <in-file> [<out-file>]\n";
+ exit(1);
+}
+
+int main(int argc, const char *argv[])
+{
+ QString file_name;
+ QString out_file_name;
+ bool report_start_end_entity = false;
+ bool report_whitespace_only_chardata = false;
+
+ for (int i = 1 ; i < argc; ++i) {
+ QString arg = QString::fromLocal8Bit(argv[i]);
+ if (arg == QLatin1String("-report-whitespace-only-chardata"))
+ report_whitespace_only_chardata = true;
+ else if (arg == QLatin1String("-report-start-end-entity"))
+ report_start_end_entity = true;
+ else if (file_name.isEmpty())
+ file_name = arg;
+ else if (out_file_name.isEmpty())
+ out_file_name = arg;
+ else
+ usage();
+ }
+
+ if (file_name.isEmpty())
+ usage();
+
+ QFile in_file(file_name);
+ if (!in_file.open(QIODevice::ReadOnly)) {
+ qerr << "Could not open " << file_name << ": " << strerror(errno) << endl;
+ return 1;
+ }
+
+ if (out_file_name.isEmpty())
+ out_file_name = file_name + ".ref";
+
+ QFile _out_file;
+ QTextStream _out_stream;
+ QTextStream *out_stream;
+ if (out_file_name == "-") {
+ out_stream = &qout;
+ } else {
+ _out_file.setFileName(out_file_name);
+ if (!_out_file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
+ qerr << "Could not open " << out_file_name << ": " << strerror(errno) << endl;
+ return 1;
+ }
+ _out_stream.setDevice(&_out_file);
+ out_stream = &_out_stream;
+ }
+
+ Parser parser;
+ if (report_start_end_entity)
+ parser.setFeature("http://trolltech.com/xml/features/report-start-end-entity", true);
+ if (report_whitespace_only_chardata)
+ parser.setFeature("http://trolltech.com/xml/features/report-whitespace-only-CharData", true);
+
+ parser.parseFile(&in_file);
+
+ out_stream->setCodec("utf8");
+
+ *out_stream << parser.result();
+
+ return 0;
+}
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
new file mode 100644
index 0000000000..d1f1c3cfda
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
@@ -0,0 +1,455 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <qxml.h>
+#include <qregexp.h>
+
+#include "parser.h"
+
+class ContentHandler : public QXmlDefaultHandler
+{
+ public:
+ ContentHandler();
+
+ // QXmlContentHandler methods
+ bool startDocument();
+ bool endDocument();
+ bool startElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName,
+ const QXmlAttributes & atts);
+ bool endElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName);
+ bool characters(const QString &ch);
+ void setDocumentLocator(QXmlLocator *locator);
+ bool startPrefixMapping (const QString &prefix, const QString & uri);
+ bool endPrefixMapping(const QString &prefix);
+ bool ignorableWhitespace (const QString & ch);
+ bool processingInstruction(const QString &target, const QString &data);
+ bool skippedEntity (const QString & name);
+
+ // QXmlErrorHandler methods
+ bool warning (const QXmlParseException & exception);
+ bool error (const QXmlParseException & exception);
+ bool fatalError (const QXmlParseException & exception);
+
+ // QXmlDTDHandler methods
+ bool notationDecl ( const QString & name, const QString & publicId,
+ const QString & systemId );
+ bool unparsedEntityDecl ( const QString & name,
+ const QString & publicId,
+ const QString & systemId,
+ const QString & notationName );
+
+ // QXmlEntityResolver methods
+ bool resolveEntity ( const QString & publicId,
+ const QString & systemId,
+ QXmlInputSource *&);
+
+ // QXmlLexicalHandler methods
+ bool startDTD ( const QString & name, const QString & publicId, const QString & systemId );
+ bool endDTD ();
+ bool startEntity ( const QString & name );
+ bool endEntity ( const QString & name );
+ bool startCDATA ();
+ bool endCDATA ();
+ bool comment ( const QString & ch );
+
+ // QXmlDeclHandler methods
+ bool attributeDecl ( const QString & eName, const QString & aName, const QString & type, const QString & valueDefault, const QString & value );
+ bool internalEntityDecl ( const QString & name, const QString & value );
+ bool externalEntityDecl ( const QString & name, const QString & publicId, const QString & systemId );
+
+
+ const QString &result() const { return m_result; }
+ const QString &errorMsg() const { return m_error_msg; }
+
+ private:
+ QString nestPrefix() const { return QString().fill(' ', 3*m_nest); }
+ QString formatAttributes(const QXmlAttributes & atts);
+ QString escapeStr(const QString &s);
+
+ unsigned m_nest;
+ QString m_result, m_error_msg;
+};
+
+ContentHandler::ContentHandler()
+{
+ m_nest = 0;
+}
+
+
+bool ContentHandler::startDocument()
+{
+ m_result += nestPrefix();
+ m_result += "startDocument()\n";
+ ++m_nest;
+ return TRUE;
+}
+
+bool ContentHandler::endDocument()
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endDocument()\n";
+ return TRUE;
+}
+
+bool ContentHandler::startElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName,
+ const QXmlAttributes & atts)
+{
+ m_result += nestPrefix();
+ m_result += "startElement(namespaceURI=\"" + escapeStr(namespaceURI)
+ + "\", localName=\"" + escapeStr(localName)
+ + "\", qName=\"" + escapeStr(qName)
+ + "\", atts=[" + formatAttributes(atts) + "])\n";
+ ++m_nest;
+ return TRUE;
+}
+
+QString ContentHandler::escapeStr(const QString &s)
+{
+ QString result = s;
+ result.replace(QRegExp("\""), "\\\"");
+ result.replace(QRegExp("\\"), "\\\\");
+ result.replace(QRegExp("\n"), "\\n");
+ result.replace(QRegExp("\r"), "\\r");
+ result.replace(QRegExp("\t"), "\\t");
+ return result;
+}
+
+QString ContentHandler::formatAttributes(const QXmlAttributes &atts)
+{
+ QString result;
+ for (int i = 0, cnt = atts.count(); i < cnt; ++i) {
+ if (i != 0) result += ", ";
+ result += "{localName=\"" + escapeStr(atts.localName(i))
+ + "\", qName=\"" + escapeStr(atts.qName(i))
+ + "\", uri=\"" + escapeStr(atts.uri(i))
+ + "\", type=\"" + escapeStr(atts.type(i))
+ + "\", value=\"" + escapeStr(atts.value(i)) + "\"}";
+ }
+ return result;
+}
+
+bool ContentHandler::endElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName)
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endElement(namespaceURI=\"" + escapeStr(namespaceURI)
+ + "\", localName=\"" + escapeStr(localName)
+ + "\", qName=\"" + escapeStr(qName) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::characters(const QString &ch)
+{
+ m_result += nestPrefix();
+ m_result += "characters(ch=\"" + escapeStr(ch) + "\")\n";
+ return TRUE;
+}
+
+void ContentHandler::setDocumentLocator(QXmlLocator *locator)
+{
+ m_result += nestPrefix();
+ m_result += "setDocumentLocator(locator={columnNumber="
+ + QString::number(locator->columnNumber())
+ + ", lineNumber=" + QString::number(locator->lineNumber())
+ + "})\n";
+}
+
+bool ContentHandler::startPrefixMapping (const QString &prefix, const QString & uri)
+{
+ m_result += nestPrefix();
+ m_result += "startPrefixMapping(prefix=\"" + escapeStr(prefix)
+ + "\", uri=\"" + escapeStr(uri) + "\")\n";
+ ++m_nest;
+ return TRUE;
+}
+
+bool ContentHandler::endPrefixMapping(const QString &prefix)
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endPrefixMapping(prefix=\"" + escapeStr(prefix) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::ignorableWhitespace(const QString & ch)
+{
+ m_result += nestPrefix();
+ m_result += "ignorableWhitespace(ch=\"" + escapeStr(ch) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::processingInstruction(const QString &target, const QString &data)
+{
+ m_result += nestPrefix();
+ m_result += "processingInstruction(target=\"" + escapeStr(target)
+ + "\", data=\"" + escapeStr(data) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::skippedEntity (const QString & name)
+{
+ m_result += nestPrefix();
+ m_result += "skippedEntity(name=\"" + escapeStr(name) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::warning(const QXmlParseException & exception)
+{
+ m_error_msg = QString("Warning %1:%2: %3")
+ .arg(exception.columnNumber())
+ .arg(exception.lineNumber())
+ .arg(exception.message());
+ m_result += nestPrefix();
+ m_result += "warning(exception={columnNumber="
+ + QString::number(exception.columnNumber())
+ + ", lineNumber="
+ + QString::number(exception.lineNumber())
+ + ", publicId=\"" + escapeStr(exception.publicId())
+ + "\", systemId=\"" + escapeStr(exception.systemId())
+ + "\", message=\"" + escapeStr(exception.message())
+ + "\"})\n";
+ return TRUE;
+}
+
+bool ContentHandler::error(const QXmlParseException & exception)
+{
+ m_error_msg = QString("Error %1:%2: %3")
+ .arg(exception.columnNumber())
+ .arg(exception.lineNumber())
+ .arg(exception.message());
+ m_result += nestPrefix();
+ m_result += "error(exception={columnNumber="
+ + QString::number(exception.columnNumber())
+ + ", lineNumber="
+ + QString::number(exception.lineNumber())
+ + ", publicId=\"" + escapeStr(exception.publicId())
+ + "\", systemId=\"" + escapeStr(exception.systemId())
+ + "\", message=\"" + escapeStr(exception.message())
+ + "\"})\n";
+ return TRUE;
+}
+
+bool ContentHandler::fatalError(const QXmlParseException & exception)
+{
+ m_error_msg = QString("Fatal error %1:%2: %3")
+ .arg(exception.columnNumber())
+ .arg(exception.lineNumber())
+ .arg(exception.message());
+ m_result += nestPrefix();
+ m_result += "fatalError(exception={columnNumber="
+ + QString::number(exception.columnNumber())
+ + ", lineNumber="
+ + QString::number(exception.lineNumber())
+ + ", publicId=\"" + escapeStr(exception.publicId())
+ + "\", systemId=\"" + escapeStr(exception.systemId())
+ + "\", message=\"" + escapeStr(exception.message())
+ + "\"})\n";
+ return TRUE;
+}
+
+bool ContentHandler::notationDecl ( const QString & name,
+ const QString & publicId,
+ const QString & systemId )
+{
+ m_result += nestPrefix();
+ m_result += "notationDecl(name=\"" + escapeStr(name) + "\", publicId=\""
+ + escapeStr(publicId) + "\", systemId=\""
+ + escapeStr(systemId) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::unparsedEntityDecl ( const QString & name,
+ const QString & publicId,
+ const QString & systemId,
+ const QString & notationName )
+{
+ m_result += nestPrefix();
+ m_result += "unparsedEntityDecl(name=\"" + escapeStr(name)
+ + "\", publicId=\"" + escapeStr(publicId)
+ + "\", systemId=\"" + escapeStr(systemId)
+ + "\", notationName=\"" + escapeStr(notationName)
+ + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::resolveEntity(const QString & publicId,
+ const QString & systemId,
+ QXmlInputSource *&)
+{
+ m_result += nestPrefix();
+ m_result += "resolveEntity(publicId=\"" + escapeStr(publicId)
+ + "\", systemId=\"" + escapeStr(systemId)
+ + "\", ret={})\n";
+ return TRUE;
+}
+
+bool ContentHandler::startDTD ( const QString & name, const QString & publicId, const QString & systemId )
+{
+ m_result += nestPrefix();
+ m_result += "startDTD(name=\"" + escapeStr(name)
+ + "\", publicId=\"" + escapeStr(publicId)
+ + "\", systemId=\"" + escapeStr(systemId) + "\")\n";
+ ++m_nest;
+ return TRUE;
+}
+
+bool ContentHandler::endDTD ()
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endDTD()\n";
+ return TRUE;
+}
+
+bool ContentHandler::startEntity ( const QString & name )
+{
+ m_result += nestPrefix();
+ m_result += "startEntity(name=\"" + escapeStr(name) + "\")\n";
+ ++m_nest;
+ return TRUE;
+}
+
+bool ContentHandler::endEntity ( const QString & name )
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endEntity(name=\"" + escapeStr(name) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::startCDATA ()
+{
+ m_result += nestPrefix();
+ m_result += "startCDATA()\n";
+ ++m_nest;
+ return TRUE;
+}
+
+bool ContentHandler::endCDATA ()
+{
+ --m_nest;
+ m_result += nestPrefix();
+ m_result += "endCDATA()\n";
+ return TRUE;
+}
+
+bool ContentHandler::comment ( const QString & ch )
+{
+ m_result += nestPrefix();
+ m_result += "comment(ch=\"" + escapeStr(ch) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::attributeDecl ( const QString & eName,
+ const QString & aName,
+ const QString & type,
+ const QString & valueDefault,
+ const QString & value )
+{
+ m_result += nestPrefix();
+ m_result += "attributeDecl(eName=\"" + escapeStr(eName) + "\", aName=\""
+ + escapeStr(aName) + "\", type=\"" + escapeStr(type)
+ + "\", valueDefault=\"" + escapeStr(valueDefault)
+ + "\", value=\"" + escapeStr(value) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::internalEntityDecl ( const QString & name,
+ const QString & value )
+{
+ m_result += nestPrefix();
+ m_result += "internatlEntityDecl(name=\"" + escapeStr(name)
+ + "\", value=\"" + escapeStr(value) + "\")\n";
+ return TRUE;
+}
+
+bool ContentHandler::externalEntityDecl ( const QString & name,
+ const QString & publicId,
+ const QString & systemId )
+{
+ m_result += nestPrefix();
+ m_result += "externalEntityDecl(name=\"" + escapeStr(name)
+ + "\", publicId=\"" + escapeStr(publicId)
+ + "\", systemId=\"" + escapeStr(systemId) + "\")\n";
+ return TRUE;
+}
+
+Parser::Parser()
+{
+ handler = new ContentHandler;
+ setContentHandler(handler);
+ setDTDHandler(handler);
+ setDeclHandler(handler);
+ setEntityResolver(handler);
+ setErrorHandler(handler);
+ setLexicalHandler(handler);
+}
+
+Parser::~Parser()
+{
+ delete handler;
+}
+
+bool Parser::parseFile(QFile *file)
+{
+ QXmlInputSource source(file);
+ return parse(source);
+}
+
+QString Parser::result() const
+{
+ return handler->result();
+}
+
+QString Parser::errorMsg() const
+{
+ return handler->errorMsg();
+}
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
new file mode 100644
index 0000000000..e3d95ce811
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PARSER_H
+#define PARSER_H
+
+#include <qfile.h>
+#include <qstring.h>
+#include <qxml.h>
+
+class ContentHandler;
+
+class Parser : public QXmlSimpleReader
+{
+ public:
+ Parser();
+ ~Parser();
+
+ bool parseFile(QFile *file);
+ QString result() const;
+ QString errorMsg() const;
+
+ private:
+ ContentHandler *handler;
+};
+
+#endif
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro
new file mode 100644
index 0000000000..93167f81c8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro
@@ -0,0 +1,15 @@
+######################################################################
+# Automatically generated by qmake (1.06a) Thu Jun 5 19:00:42 2003
+######################################################################
+
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+HEADERS += parser.h
+SOURCES += main.cpp parser.cpp
+
+CONFIG += qt warn_on debug
+QT += xml
+
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
new file mode 100644
index 0000000000..bc3cbd2dfd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
@@ -0,0 +1,19 @@
+load(qttest_p4)
+TEMPLATE = app
+DEPENDPATH += parser
+INCLUDEPATH += . parser
+
+# Input
+HEADERS += parser/parser.h
+SOURCES += tst_qxmlsimplereader.cpp parser/parser.cpp
+
+CONFIG += no_batch
+QT += network xml
+QT -= gui
+
+
+wince*|symbian: {
+ addFiles.files = encodings parser xmldocs
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+}
diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
new file mode 100644
index 0000000000..f2a973c78e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
@@ -0,0 +1,775 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QDomDocument>
+#include <qthread.h>
+#include <qtcpserver.h>
+#include <qtcpsocket.h>
+#include <QtTest/QtTest>
+#include <qfile.h>
+#include <qstring.h>
+#include <qdir.h>
+#include <qbuffer.h>
+#include "parser/parser.h"
+
+static const char *const inputString = "<!DOCTYPE inferno [<!ELEMENT inferno (circle+)><!ELEMENT circle (#PCDATA)>]><inferno><circle /><circle /></inferno>";
+static const char *const refString = "setDocumentLocator(locator={columnNumber=1, lineNumber=1})\nstartDocument()\nstartDTD(name=\"inferno\", publicId=\"\", systemId=\"\")\nendDTD()\nstartElement(namespaceURI=\"\", localName=\"inferno\", qName=\"inferno\", atts=[])\nstartElement(namespaceURI=\"\", localName=\"circle\", qName=\"circle\", atts=[])\nendElement(namespaceURI=\"\", localName=\"circle\", qName=\"circle\")\nstartElement(namespaceURI=\"\", localName=\"circle\", qName=\"circle\", atts=[])\nendElement(namespaceURI=\"\", localName=\"circle\", qName=\"circle\")\nendElement(namespaceURI=\"\", localName=\"inferno\", qName=\"inferno\")\nendDocument()\n";
+
+//TESTED_CLASS=
+//TESTED_FILES=
+
+#define TEST_PORT 1088
+
+class XmlServer : public QThread
+{
+ Q_OBJECT
+public:
+ XmlServer();
+ bool quit_soon;
+
+protected:
+ virtual void run();
+};
+
+XmlServer::XmlServer()
+{
+ quit_soon = false;
+}
+
+#define CHUNK_SIZE 1
+
+void XmlServer::run()
+{
+ QTcpServer srv;
+
+ if (!srv.listen(QHostAddress::Any, TEST_PORT))
+ return;
+
+ for (;;) {
+ srv.waitForNewConnection(100);
+
+ if (QTcpSocket *sock = srv.nextPendingConnection()) {
+ QByteArray fileName;
+ for (;;) {
+ char c;
+ if (sock->getChar(&c)) {
+ if (c == '\n')
+ break;
+ fileName.append(c);
+ } else {
+ if (!sock->waitForReadyRead(-1))
+ break;
+ }
+ }
+
+ QFile file(QString::fromLocal8Bit(fileName));
+ if (!file.open(QIODevice::ReadOnly)) {
+ qWarning() << "XmlServer::run(): could not open" << fileName;
+ sock->abort();
+ delete sock;
+ continue;
+ }
+
+ QByteArray data = file.readAll();
+ for (int i = 0; i < data.size();) {
+// sock->putChar(data.at(i));
+ int cnt = qMin(CHUNK_SIZE, data.size() - i);
+ sock->write(data.constData() + i, cnt);
+ i += cnt;
+ sock->flush();
+ QTest::qSleep(1);
+
+ if (quit_soon) {
+ sock->abort();
+ break;
+ }
+ }
+
+ sock->disconnectFromHost();
+ delete sock;
+ }
+
+ if (quit_soon)
+ break;
+ }
+
+ srv.close();
+}
+
+class tst_QXmlSimpleReader : public QObject
+{
+ Q_OBJECT
+
+ public:
+ tst_QXmlSimpleReader();
+ ~tst_QXmlSimpleReader();
+
+ private slots:
+
+ void testGoodXmlFile();
+ void testGoodXmlFile_data();
+ void testBadXmlFile();
+ void testBadXmlFile_data();
+ void testIncrementalParsing();
+ void testIncrementalParsing_data();
+ void setDataQString();
+ void inputFromQIODevice();
+ void inputFromString();
+ void inputFromSocket_data();
+ void inputFromSocket();
+
+ void idsInParseException1();
+ void idsInParseException2();
+ void preserveCharacterReferences() const;
+ void reportNamespace() const;
+ void reportNamespace_data() const;
+ void roundtripWithNamespaces() const;
+
+ private:
+ static QDomDocument fromByteArray(const QString &title, const QByteArray &ba, bool *ok);
+ XmlServer *server;
+};
+
+tst_QXmlSimpleReader::tst_QXmlSimpleReader()
+{
+ server = new XmlServer();
+ server->setParent(this);
+ server->start();
+ QTest::qSleep(1000);
+}
+
+tst_QXmlSimpleReader::~tst_QXmlSimpleReader()
+{
+ server->quit_soon = true;
+ server->wait();
+}
+
+class MyErrorHandler : public QXmlErrorHandler
+{
+public:
+ QString publicId;
+ QString systemId;
+
+ virtual bool error(const QXmlParseException &)
+ {
+ return false;
+ }
+
+ virtual QString errorString() const
+ {
+ return QString();
+ }
+
+ virtual bool fatalError(const QXmlParseException &exception)
+ {
+ publicId = exception.publicId();
+ systemId = exception.systemId();
+ return true;
+ }
+
+ virtual bool warning(const QXmlParseException &)
+ {
+ return true;
+ }
+
+};
+
+void tst_QXmlSimpleReader::idsInParseException1()
+{
+ MyErrorHandler handler;
+ QXmlSimpleReader reader;
+
+ reader.setErrorHandler(&handler);
+
+ /* A non-wellformed XML document with PUBLIC and SYSTEM. */
+ QByteArray input("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" "
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"
+ "<head>"
+ "<a/><a/><a/>"
+ "<head/>");
+
+ QBuffer buff(&input);
+ QXmlInputSource source(&buff);
+
+ /* Yes, parsing should be reported as a failure. */
+ QVERIFY(!reader.parse(source));
+
+ QCOMPARE(handler.publicId, QString::fromLatin1("-//W3C//DTD XHTML 1.0 Strict//EN"));
+ QCOMPARE(handler.systemId, QString::fromLatin1("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"));
+}
+
+void tst_QXmlSimpleReader::idsInParseException2()
+{
+ MyErrorHandler handler;
+ QXmlSimpleReader reader;
+
+ reader.setErrorHandler(&handler);
+
+ /* A non-wellformed XML document with only SYSTEM. */
+ QByteArray input("<!DOCTYPE html SYSTEM \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"
+ "<head>"
+ "<a/><a/><a/>"
+ "<head/>");
+
+ QBuffer buff(&input);
+ QXmlInputSource source(&buff);
+
+ /* Yes, parsing should be reported as a failure. */
+ QVERIFY(!reader.parse(source));
+
+ QCOMPARE(handler.publicId, QString());
+ QCOMPARE(handler.systemId, QString::fromLatin1("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"));
+}
+
+static QStringList findXmlFiles(QString dir_name)
+{
+ QStringList result;
+
+ QDir dir(dir_name);
+ QFileInfoList file_list = dir.entryInfoList(QStringList("*.xml"), QDir::Files, QDir::Name);
+
+ QFileInfoList::const_iterator it = file_list.begin();
+ for (; it != file_list.end(); ++it) {
+ const QFileInfo &file_info = *it;
+ result.append(file_info.filePath());
+ }
+
+ return result;
+}
+
+
+void tst_QXmlSimpleReader::testGoodXmlFile_data()
+{
+ const char * const good_data_dirs[] = {
+ "xmldocs/valid/sa",
+ "xmldocs/valid/not-sa",
+ "xmldocs/valid/ext-sa",
+ 0
+ };
+ const char * const *d = good_data_dirs;
+
+ QStringList good_file_list;
+ for (; *d != 0; ++d)
+ good_file_list += findXmlFiles(*d);
+
+ QTest::addColumn<QString>("file_name");
+ QStringList::const_iterator it = good_file_list.begin();
+ for (; it != good_file_list.end(); ++it)
+ QTest::newRow((*it).toLatin1()) << *it;
+}
+
+void tst_QXmlSimpleReader::testGoodXmlFile()
+{
+ QFETCH(QString, file_name);
+ QFile file(file_name);
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ QString content = file.readAll();
+ file.close();
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ Parser parser;
+
+// static int i = 0;
+// qWarning("Test nr: " + QString::number(i)); ++i;
+ QEXPECT_FAIL("xmldocs/valid/sa/089.xml", "", Continue);
+ QVERIFY(parser.parseFile(&file));
+
+ QFile ref_file(file_name + ".ref");
+ QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
+ QTextStream ref_stream(&ref_file);
+ ref_stream.setCodec("UTF-8");
+ QString ref_file_contents = ref_stream.readAll();
+
+ QEXPECT_FAIL("xmldocs/valid/sa/089.xml", "", Continue);
+ QCOMPARE(parser.result(), ref_file_contents);
+}
+
+void tst_QXmlSimpleReader::testBadXmlFile_data()
+{
+ const char * const bad_data_dirs[] = {
+ "xmldocs/not-wf/sa",
+ 0
+ };
+ const char * const *d = bad_data_dirs;
+
+ QStringList bad_file_list;
+ for (; *d != 0; ++d)
+ bad_file_list += findXmlFiles(*d);
+
+ QTest::addColumn<QString>("file_name");
+ QStringList::const_iterator it = bad_file_list.begin();
+ for (; it != bad_file_list.end(); ++it)
+ QTest::newRow((*it).toLatin1()) << *it;
+}
+
+void tst_QXmlSimpleReader::testBadXmlFile()
+{
+ QFETCH(QString, file_name);
+ QFile file(file_name);
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ Parser parser;
+
+// static int i = 0;
+// qWarning("Test nr: " + QString::number(++i));
+ QEXPECT_FAIL("xmldocs/not-wf/sa/030.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/031.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/032.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/033.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/038.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/072.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/073.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/074.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/076.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/077.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/078.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/085.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/086.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/087.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/101.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/102.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/104.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/116.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/117.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/119.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/122.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/132.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/142.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/143.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/144.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/145.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/146.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/160.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/162.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/166.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/167.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/168.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/169.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/170.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/171.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/172.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/173.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/174.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/175.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/177.xml", "", Abort);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/180.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/181.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/182.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/185.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/186.xml", "", Continue);
+
+ QVERIFY(!parser.parseFile(&file));
+
+ QFile ref_file(file_name + ".ref");
+ QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
+ QTextStream ref_stream(&ref_file);
+ ref_stream.setCodec("UTF-8");
+ QString ref_file_contents = ref_stream.readAll();
+
+ QEXPECT_FAIL("xmldocs/not-wf/sa/144.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/145.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/146.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/167.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/166.xml", "", Continue);
+ QEXPECT_FAIL("xmldocs/not-wf/sa/170.xml", "", Continue);
+
+ QCOMPARE(parser.result(), ref_file_contents);
+}
+
+void tst_QXmlSimpleReader::testIncrementalParsing_data()
+{
+ QTest::addColumn<QString>("file_name");
+ QTest::addColumn<int>("chunkSize");
+
+ const char * const good_data_dirs[] = {
+ "xmldocs/valid/sa",
+ "xmldocs/valid/not-sa",
+ "xmldocs/valid/ext-sa",
+ 0
+ };
+ const char * const *d = good_data_dirs;
+
+ QStringList good_file_list;
+ for (; *d != 0; ++d)
+ good_file_list += findXmlFiles(*d);
+
+ for (int i=1; i<10; ++i) {
+ QStringList::const_iterator it = good_file_list.begin();
+ for (; it != good_file_list.end(); ++it) {
+ if ( *it == "xmldocs/valid/sa/089.xml" )
+ continue;// TODO: fails at the moment -- don't bother
+ if ( i==1 && (
+ *it == "xmldocs/valid/sa/049.xml" ||
+ *it == "xmldocs/valid/sa/050.xml" ||
+ *it == "xmldocs/valid/sa/051.xml" ||
+ *it == "xmldocs/valid/sa/052.xml" ) ) {
+ continue; // TODO: fails at the moment -- don't bother
+ }
+ QTest::newRow(QString("%1 %2").arg(*it).arg(i).toLatin1()) << *it << i;
+ }
+ }
+}
+
+void tst_QXmlSimpleReader::testIncrementalParsing()
+{
+ QFETCH(QString, file_name);
+ QFETCH(int, chunkSize);
+
+ QFile file(file_name);
+ QVERIFY(file.open(QIODevice::ReadOnly));
+
+ Parser parser;
+ QXmlInputSource source;
+ bool first = true;
+ while (!file.atEnd()) {
+ source.setData(file.read(chunkSize));
+ if(first) {
+ QVERIFY(parser.parse(&source, true));
+ first = false;
+ } else {
+ QVERIFY(parser.parseContinue());
+ }
+ }
+ // detect end of document
+ QVERIFY(parser.parseContinue());
+ // parsing should fail after the end of the document was reached
+ QVERIFY(!parser.parseContinue());
+
+ QFile ref_file(file_name + ".ref");
+ QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
+ QTextStream ref_stream(&ref_file);
+ ref_stream.setCodec("UTF-8");
+ QString ref_file_contents = ref_stream.readAll();
+
+ QCOMPARE(parser.result(), ref_file_contents);
+}
+
+void tst_QXmlSimpleReader::setDataQString()
+{
+ QString input = inputString;
+ QString ref = refString;
+
+ QXmlInputSource source;
+ Parser parser;
+
+ source.setData(input);
+ QVERIFY(parser.parse(&source,false));
+
+ QBuffer resultBuffer;
+ resultBuffer.setData(parser.result().toLatin1());
+
+ QBuffer refBuffer;
+ refBuffer.setData(ref.toLatin1());
+
+ resultBuffer.open(QIODevice::ReadOnly);
+ refBuffer.open(QIODevice::ReadOnly);
+
+ bool success = true;
+ while (resultBuffer.canReadLine()) {
+ if (!refBuffer.canReadLine()) {
+ success = false; break ;
+ }
+ if (resultBuffer.readLine().simplified() != refBuffer.readLine().simplified()) {
+ success = false; break ;
+ }
+ }
+ QVERIFY(success);
+}
+
+void tst_QXmlSimpleReader::inputFromQIODevice()
+{
+ QBuffer inputBuffer;
+ inputBuffer.setData(inputString);
+
+ QXmlInputSource source(&inputBuffer);
+ Parser parser;
+
+ QVERIFY(parser.parse(&source,false));
+
+ QBuffer resultBuffer;
+ resultBuffer.setData(parser.result().toLatin1());
+
+ QBuffer refBuffer;
+ refBuffer.setData(refString);
+
+ resultBuffer.open(QIODevice::ReadOnly);
+ refBuffer.open(QIODevice::ReadOnly);
+
+ bool success = true;
+ while (resultBuffer.canReadLine()) {
+ if (!refBuffer.canReadLine()) {
+ success = false; break ;
+ }
+ if (resultBuffer.readLine().simplified() != refBuffer.readLine().simplified()) {
+ success = false; break ;
+ }
+ }
+ QVERIFY(success);
+}
+
+void tst_QXmlSimpleReader::inputFromString()
+{
+ QString str = "<foo><bar>kake</bar><bar>ja</bar></foo>";
+ QBuffer buff;
+ buff.setData((char*)str.utf16(), str.size()*sizeof(ushort));
+
+ QXmlInputSource input(&buff);
+
+ QXmlSimpleReader reader;
+ QXmlDefaultHandler handler;
+ reader.setContentHandler(&handler);
+
+ QVERIFY(reader.parse(&input));
+}
+
+void tst_QXmlSimpleReader::inputFromSocket_data()
+{
+ QStringList files = findXmlFiles(QLatin1String("encodings"));
+ QVERIFY(files.count() > 0);
+
+ QTest::addColumn<QString>("file_name");
+
+ foreach (const QString &file_name, files)
+ QTest::newRow(file_name.toLatin1()) << file_name;
+}
+
+void tst_QXmlSimpleReader::inputFromSocket()
+{
+ QFETCH(QString, file_name);
+
+#if defined(Q_OS_SYMBIAN)
+ QSKIP("Symbian: Skipped due to problems in Open C and QtNetwork", SkipAll);
+#endif
+
+#if defined(Q_OS_WIN32) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC_NET))
+ QSKIP("Regression caused by QHOstInfo change 294548, see task 202231.", SkipAll);
+#endif
+ QTcpSocket sock;
+ sock.connectToHost(QHostAddress::LocalHost, TEST_PORT);
+
+ const bool connectionSuccess = sock.waitForConnected();
+ if(!connectionSuccess) {
+ QTextStream out(stderr);
+ out << "QTcpSocket::errorString()" << sock.errorString();
+ }
+
+ QVERIFY(connectionSuccess);
+
+ sock.write(file_name.toLocal8Bit() + "\n");
+ QVERIFY(sock.waitForBytesWritten());
+
+ QXmlInputSource input(&sock);
+
+ QXmlSimpleReader reader;
+ QXmlDefaultHandler handler;
+ reader.setContentHandler(&handler);
+
+ QVERIFY(reader.parse(&input));
+
+// qDebug() << "tst_QXmlSimpleReader::inputFromSocket(): success" << file_name;
+}
+
+void tst_QXmlSimpleReader::preserveCharacterReferences() const
+{
+ class Handler : public QXmlDefaultHandler
+ {
+ public:
+ virtual bool characters(const QString &chars)
+ {
+ received = chars;
+ return true;
+ }
+
+ QString received;
+ };
+
+ {
+ QByteArray input("<e>A&#160;&#160;&#160;&#160;A</e>");
+
+ QBuffer buff(&input);
+ QXmlInputSource source(&buff);
+
+ Handler h;
+ QXmlSimpleReader reader;
+ reader.setContentHandler(&h);
+ QVERIFY(reader.parse(&source, false));
+
+ QCOMPARE(h.received, QLatin1Char('A') + QString(4, QChar(160)) + QLatin1Char('A'));
+ }
+
+ {
+ QByteArray input("<e>&#160;&#160;&#160;&#160;</e>");
+
+ QBuffer buff(&input);
+ QXmlInputSource source(&buff);
+
+ Handler h;
+ QXmlSimpleReader reader;
+ reader.setContentHandler(&h);
+ QVERIFY(reader.parse(&source, false));
+
+ QCOMPARE(h.received, QString(4, QChar(160)));
+ }
+}
+
+void tst_QXmlSimpleReader::reportNamespace() const
+{
+ class Handler : public QXmlDefaultHandler
+ {
+ public:
+ virtual bool startElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName,
+ const QXmlAttributes &)
+ {
+ startNamespaceURI = namespaceURI;
+ startLocalName = localName;
+ startQName = qName;
+
+ return true;
+ }
+
+ virtual bool endElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName)
+ {
+ endNamespaceURI = namespaceURI;
+ endLocalName = localName;
+ endQName = qName;
+
+ return true;
+ }
+
+ QString startLocalName;
+ QString startQName;
+ QString startNamespaceURI;
+ QString endLocalName;
+ QString endQName;
+ QString endNamespaceURI;
+ };
+
+ QXmlSimpleReader reader;
+ Handler handler;
+ reader.setContentHandler(&handler);
+
+ QFETCH(QByteArray, input);
+
+ QBuffer buffer(&input);
+ QVERIFY(buffer.open(QIODevice::ReadOnly));
+
+ QXmlInputSource source(&buffer);
+ QVERIFY(reader.parse(source));
+
+ QFETCH(QString, expectedQName);
+ QFETCH(QString, expectedLocalName);
+ QFETCH(QString, expectedNamespace);
+
+ QCOMPARE(handler.startNamespaceURI, expectedNamespace);
+ QCOMPARE(handler.startLocalName, expectedLocalName);
+ QCOMPARE(handler.startQName, expectedQName);
+
+ QCOMPARE(handler.endNamespaceURI, expectedNamespace);
+ QCOMPARE(handler.endLocalName, expectedLocalName);
+ QCOMPARE(handler.endQName, expectedQName);
+}
+
+void tst_QXmlSimpleReader::reportNamespace_data() const
+{
+ QTest::addColumn<QByteArray>("input");
+ QTest::addColumn<QString>("expectedQName");
+ QTest::addColumn<QString>("expectedLocalName");
+ QTest::addColumn<QString>("expectedNamespace");
+
+ QTest::newRow("default ns") << QByteArray("<element xmlns='http://example.com/'/>")
+ << QString("element")
+ << QString("element")
+ << QString("http://example.com/");
+
+ QTest::newRow("with prefix") << QByteArray("<p:element xmlns:p='http://example.com/'/>")
+ << QString("p:element")
+ << QString("element")
+ << QString("http://example.com/");
+}
+
+QDomDocument tst_QXmlSimpleReader::fromByteArray(const QString &title, const QByteArray &ba, bool *ok)
+{
+ QDomDocument doc(title);
+ *ok = doc.setContent(ba, true);
+ return doc;
+}
+
+void tst_QXmlSimpleReader::roundtripWithNamespaces() const
+{
+ const char *const expected = "<element b:attr=\"value\" xmlns:a=\"http://www.example.com/A\" xmlns:b=\"http://www.example.com/B\" />\n";
+ bool ok;
+
+ {
+ const char *const xml = "<element xmlns:b=\"http://www.example.com/B\" b:attr=\"value\" xmlns:a=\"http://www.example.com/A\"/>";
+
+ const QDomDocument one(fromByteArray("document", xml, &ok));
+ QVERIFY(ok);
+ const QDomDocument two(fromByteArray("document2", one.toByteArray(2), &ok));
+ QVERIFY(ok);
+
+ QEXPECT_FAIL("", "Known problem, see 154573. The fix happens to break uic.", Abort);
+
+ QCOMPARE(expected, one.toByteArray().constData());
+ QCOMPARE(one.toByteArray(2).constData(), two.toByteArray(2).constData());
+ QCOMPARE(two.toByteArray(2).constData(), two.toByteArray(2).constData());
+ }
+
+ {
+ const char *const xml = "<element b:attr=\"value\" xmlns:b=\"http://www.example.com/B\" xmlns:a=\"http://www.example.com/A\"/>";
+
+ const QDomDocument one(fromByteArray("document", xml, &ok));
+ QVERIFY(ok);
+ const QDomDocument two(fromByteArray("document2", one.toByteArray(2), &ok));
+ QVERIFY(ok);
+
+ QCOMPARE(expected, one.toByteArray().constData());
+ QCOMPARE(one.toByteArray(2).constData(), two.toByteArray(2).constData());
+ QCOMPARE(two.toByteArray(2).constData(), two.toByteArray(2).constData());
+ }
+}
+
+QTEST_MAIN(tst_QXmlSimpleReader)
+#include "tst_qxmlsimplereader.moc"
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml
new file mode 100644
index 0000000000..d33ec68dcd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml
@@ -0,0 +1,5 @@
+<doc>
+<doc
+?
+<a</a>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml.ref
new file mode 100644
index 0000000000..e0fa20f83d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/001.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=1, lineNumber=3, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml
new file mode 100644
index 0000000000..0a64d52428
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml
@@ -0,0 +1,4 @@
+<doc>
+<.doc></.doc>
+</doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml.ref
new file mode 100644
index 0000000000..8ebfac2a80
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/002.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=2, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml
new file mode 100644
index 0000000000..e0b8bae4a4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml
@@ -0,0 +1 @@
+<doc><? ?></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml.ref
new file mode 100644
index 0000000000..988690b883
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/003.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml
new file mode 100644
index 0000000000..e85bc96e56
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml
@@ -0,0 +1 @@
+<doc><?target some data></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml.ref
new file mode 100644
index 0000000000..0085dfefe6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/004.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml
new file mode 100644
index 0000000000..7cd44ef10c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml
@@ -0,0 +1 @@
+<doc><?target some data?</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml.ref
new file mode 100644
index 0000000000..0085dfefe6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/005.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml
new file mode 100644
index 0000000000..8594c35cc7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml
@@ -0,0 +1 @@
+<doc><!-- a comment -- another --></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml.ref
new file mode 100644
index 0000000000..3d07b93d8e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/006.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=23, lineNumber=1, publicId="", systemId="", message="error occurred while parsing comment"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml
new file mode 100644
index 0000000000..286756fdd5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml
@@ -0,0 +1 @@
+<doc>&amp no refc</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml.ref
new file mode 100644
index 0000000000..bbd182b7f7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/007.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=10, lineNumber=1, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml
new file mode 100644
index 0000000000..29ef40306b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml
@@ -0,0 +1 @@
+<doc>&.entity;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml.ref
new file mode 100644
index 0000000000..19d21b4b3e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/008.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=7, lineNumber=1, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml
new file mode 100644
index 0000000000..8e3ff7de10
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml
@@ -0,0 +1 @@
+<doc>&#RE;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml.ref
new file mode 100644
index 0000000000..a885634000
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/009.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml
new file mode 100644
index 0000000000..a6790846c9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml
@@ -0,0 +1 @@
+<doc>A & B</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml.ref
new file mode 100644
index 0000000000..7db0ddb551
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/010.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml
new file mode 100644
index 0000000000..57eaf9fc48
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml
@@ -0,0 +1 @@
+<doc a1></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml.ref
new file mode 100644
index 0000000000..bb837957be
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/011.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml
new file mode 100644
index 0000000000..1b2539ffa6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml
@@ -0,0 +1 @@
+<doc a1=v1></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml.ref
new file mode 100644
index 0000000000..333fb0db76
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/012.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml
new file mode 100644
index 0000000000..3540df9143
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml
@@ -0,0 +1 @@
+<doc a1="v1'></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml.ref
new file mode 100644
index 0000000000..1fececc438
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/013.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=14, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml
new file mode 100644
index 0000000000..a613115609
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml
@@ -0,0 +1 @@
+<doc a1="<foo>"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml.ref
new file mode 100644
index 0000000000..a9230f2d7c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/014.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=10, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml
new file mode 100644
index 0000000000..f2baf947b5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml
@@ -0,0 +1 @@
+<doc a1=></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml.ref
new file mode 100644
index 0000000000..333fb0db76
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/015.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml
new file mode 100644
index 0000000000..22d4b2e265
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml
@@ -0,0 +1 @@
+<doc a1="v1" "v2"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml.ref
new file mode 100644
index 0000000000..e47a79ca68
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/016.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=14, lineNumber=1, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml
new file mode 100644
index 0000000000..a76f5929e9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml
@@ -0,0 +1 @@
+<doc><![CDATA[</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml.ref
new file mode 100644
index 0000000000..0085dfefe6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/017.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml
new file mode 100644
index 0000000000..66e204acc4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml
@@ -0,0 +1 @@
+<doc><![CDATA [ stuff]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml.ref
new file mode 100644
index 0000000000..651fa05573
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/018.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=14, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml
new file mode 100644
index 0000000000..b835c2d752
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml
@@ -0,0 +1 @@
+<doc></>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml.ref
new file mode 100644
index 0000000000..9196faad6d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/019.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml
new file mode 100644
index 0000000000..b30cfcfc10
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml
@@ -0,0 +1 @@
+<doc a1="A & B"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml.ref
new file mode 100644
index 0000000000..f52f775f12
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/020.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=13, lineNumber=1, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml
new file mode 100644
index 0000000000..1bfa84aa64
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml
@@ -0,0 +1 @@
+<doc a1="a&b"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml.ref
new file mode 100644
index 0000000000..02ae4699b6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/021.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=13, lineNumber=1, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml
new file mode 100644
index 0000000000..44c803bf1b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml
@@ -0,0 +1 @@
+<doc a1="&#123:"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml.ref
new file mode 100644
index 0000000000..42bf38f488
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/022.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=15, lineNumber=1, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml
new file mode 100644
index 0000000000..b877ae2a6b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml
@@ -0,0 +1 @@
+<doc 12="34"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml.ref
new file mode 100644
index 0000000000..94f5cfa68c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/023.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml
new file mode 100644
index 0000000000..cf68f2c073
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml
@@ -0,0 +1,3 @@
+<doc>
+<123></123>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml.ref
new file mode 100644
index 0000000000..8ebfac2a80
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/024.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=2, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml
new file mode 100644
index 0000000000..6cba95cd78
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml
@@ -0,0 +1 @@
+<doc>]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml.ref
new file mode 100644
index 0000000000..8f5d812e49
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/025.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="error occurred while parsing content"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml
new file mode 100644
index 0000000000..347984fa73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml
@@ -0,0 +1 @@
+<doc>]]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml.ref
new file mode 100644
index 0000000000..3d0c743f13
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/026.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="error occurred while parsing content"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml
new file mode 100644
index 0000000000..cfafaf0d70
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml
@@ -0,0 +1,3 @@
+<doc>
+<!-- abc
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml.ref
new file mode 100644
index 0000000000..178563e3d9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/027.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=1, lineNumber=4, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml
new file mode 100644
index 0000000000..522714993a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml
@@ -0,0 +1,4 @@
+<doc>
+<?a pi that is not closed
+</doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml.ref
new file mode 100644
index 0000000000..45a61328b0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/028.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=1, lineNumber=5, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml
new file mode 100644
index 0000000000..9a8008bc9f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml
@@ -0,0 +1 @@
+<doc>abc]]]>def</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml.ref
new file mode 100644
index 0000000000..da043096c0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/029.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=12, lineNumber=1, publicId="", systemId="", message="error occurred while parsing content"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml
new file mode 100644
index 0000000000..25861fa19b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml
@@ -0,0 +1 @@
+<doc>A form feed ( ) is not legal in data</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml.ref
new file mode 100644
index 0000000000..3d7b2fd5f0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/030.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="A form feed ( ) is not legal in data")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml
new file mode 100644
index 0000000000..f946536f39
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml
@@ -0,0 +1 @@
+<doc><?pi a form feed ( ) is not allowed in a pi?></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml.ref
new file mode 100644
index 0000000000..240d633529
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/031.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ processingInstruction(target="pi", data="a form feed ( ) is not allowed in a pi")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml
new file mode 100644
index 0000000000..75952017ca
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml
@@ -0,0 +1 @@
+<doc><!-- a form feed ( ) is not allowed in a comment --></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml.ref
new file mode 100644
index 0000000000..a85cab71f0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/032.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ comment(ch=" a form feed ( ) is not allowed in a comment ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml
new file mode 100644
index 0000000000..afd2328402
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml
@@ -0,0 +1 @@
+<doc>abcdef</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml.ref
new file mode 100644
index 0000000000..a059f8e0b2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/033.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="abcdef")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml
new file mode 100644
index 0000000000..d74a77719b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml
@@ -0,0 +1 @@
+<doc >A form-feed is not white space or a name character</doc >
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml.ref
new file mode 100644
index 0000000000..723dc1aa00
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/034.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=5, lineNumber=1, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml
new file mode 100644
index 0000000000..e1fc920522
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml
@@ -0,0 +1 @@
+<doc>1 < 2 but not in XML</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml.ref
new file mode 100644
index 0000000000..6ca9412864
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/035.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="1 ")
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml
new file mode 100644
index 0000000000..b8ecb21ba1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml
@@ -0,0 +1,2 @@
+<doc></doc>
+Illegal data
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml.ref
new file mode 100644
index 0000000000..5341fe5c8a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/036.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml
new file mode 100644
index 0000000000..2e02662926
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml
@@ -0,0 +1,2 @@
+<doc></doc>
+&#32;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml.ref
new file mode 100644
index 0000000000..5341fe5c8a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/037.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml
new file mode 100644
index 0000000000..68b2803f82
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml
@@ -0,0 +1 @@
+<doc x="foo" y="bar" x="baz"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml.ref
new file mode 100644
index 0000000000..914f7edc6a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/038.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="x", qName="x", uri="", type="CDATA", value="foo"}, {localName="y", qName="y", uri="", type="CDATA", value="bar"}, {localName="x", qName="x", uri="", type="CDATA", value="baz"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml
new file mode 100644
index 0000000000..80429e3e40
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml
@@ -0,0 +1 @@
+<doc><a></aa></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml.ref
new file mode 100644
index 0000000000..82a67116c1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/039.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ fatalError(exception={columnNumber=13, lineNumber=1, publicId="", systemId="", message="tag mismatch"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml
new file mode 100644
index 0000000000..dc8ba5a434
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml
@@ -0,0 +1,2 @@
+<doc></doc>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml.ref
new file mode 100644
index 0000000000..a28c24ab56
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/040.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=2, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml
new file mode 100644
index 0000000000..30bcdd6bfe
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml
@@ -0,0 +1,2 @@
+<doc/>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml.ref
new file mode 100644
index 0000000000..a28c24ab56
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/041.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=2, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml
new file mode 100644
index 0000000000..4ae50efc7b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml
@@ -0,0 +1 @@
+<doc/></doc/>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml.ref
new file mode 100644
index 0000000000..493c67a337
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/042.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml
new file mode 100644
index 0000000000..41824eee4b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml
@@ -0,0 +1,2 @@
+<doc/>
+Illegal data
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml.ref
new file mode 100644
index 0000000000..5341fe5c8a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/043.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml
new file mode 100644
index 0000000000..3fc232dc37
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml
@@ -0,0 +1 @@
+<doc/><doc/>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml.ref
new file mode 100644
index 0000000000..493c67a337
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/044.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml
new file mode 100644
index 0000000000..00c10f00bf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml
@@ -0,0 +1,4 @@
+<doc>
+<a/
+</doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml.ref
new file mode 100644
index 0000000000..d030deb272
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/045.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ fatalError(exception={columnNumber=4, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml
new file mode 100644
index 0000000000..265cb15301
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml
@@ -0,0 +1,3 @@
+<doc>
+<a/</a>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml.ref
new file mode 100644
index 0000000000..d030deb272
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/046.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ fatalError(exception={columnNumber=4, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml
new file mode 100644
index 0000000000..d18a4a4440
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml
@@ -0,0 +1,3 @@
+<doc>
+<a / >
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml.ref
new file mode 100644
index 0000000000..4693ac42c3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/047.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ fatalError(exception={columnNumber=5, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml
new file mode 100644
index 0000000000..67419c1ed5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml
@@ -0,0 +1,3 @@
+<doc>
+</doc>
+<![CDATA[]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml.ref
new file mode 100644
index 0000000000..f8e19b6108
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/048.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=3, lineNumber=3, publicId="", systemId="", message="error occurred while parsing comment"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml
new file mode 100644
index 0000000000..3cf0e79422
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml
@@ -0,0 +1,4 @@
+<doc>
+<a><![CDATA[xyz]]]></a>
+<![CDATA[]]></a>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml.ref
new file mode 100644
index 0000000000..1d89054d77
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/049.xml.ref
@@ -0,0 +1,14 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ startCDATA()
+ characters(ch="xyz]")
+ endCDATA()
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\r\n")
+ startCDATA()
+ characters(ch="")
+ endCDATA()
+ fatalError(exception={columnNumber=16, lineNumber=3, publicId="", systemId="", message="tag mismatch"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml.ref
new file mode 100644
index 0000000000..2a3b59e093
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/050.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=1, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml
new file mode 100644
index 0000000000..b52df12cc4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml
@@ -0,0 +1,3 @@
+<!-- a comment -->
+<![CDATA[]]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml.ref
new file mode 100644
index 0000000000..71c3e0d2f9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/051.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ comment(ch=" a comment ")
+ fatalError(exception={columnNumber=3, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml
new file mode 100644
index 0000000000..8283895990
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml
@@ -0,0 +1,3 @@
+<!-- a comment -->
+&#32;
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml.ref
new file mode 100644
index 0000000000..42126fdb25
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/052.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ comment(ch=" a comment ")
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml
new file mode 100644
index 0000000000..9d7f36920f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml
@@ -0,0 +1 @@
+<doc></DOC>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml.ref
new file mode 100644
index 0000000000..515dd0b446
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/053.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=11, lineNumber=1, publicId="", systemId="", message="tag mismatch"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml
new file mode 100644
index 0000000000..eda553c6d3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY foo PUBLIC "some public id">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml.ref
new file mode 100644
index 0000000000..18412e39b2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/054.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=37, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml
new file mode 100644
index 0000000000..cbb3683a9d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc [
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml.ref
new file mode 100644
index 0000000000..3e1e132b5e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/055.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=2, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml
new file mode 100644
index 0000000000..a681684c58
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc -- a comment -- []>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml.ref
new file mode 100644
index 0000000000..938a47c172
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/056.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=15, lineNumber=1, publicId="", systemId="", message="error occurred while parsing document type definition"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml
new file mode 100644
index 0000000000..848d347120
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "whatever" -- a comment -->
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml.ref
new file mode 100644
index 0000000000..28576a7fdf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/057.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="whatever")
+ fatalError(exception={columnNumber=23, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml
new file mode 100644
index 0000000000..daba266af2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 (foo,bar) #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml.ref
new file mode 100644
index 0000000000..aa3101b7ef
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/058.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=22, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml
new file mode 100644
index 0000000000..316083dc25
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 NMTOKEN v1>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml.ref
new file mode 100644
index 0000000000..d0c60b2bf5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/059.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=26, lineNumber=3, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml
new file mode 100644
index 0000000000..9a610fd38f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 NAME #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml.ref
new file mode 100644
index 0000000000..22f1636205
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/060.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=19, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml
new file mode 100644
index 0000000000..59181e706f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e PUBLIC "whatever""e.ent">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml.ref
new file mode 100644
index 0000000000..d49ec689aa
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/061.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=29, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml
new file mode 100644
index 0000000000..e62e9cd370
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY foo"some text">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml.ref
new file mode 100644
index 0000000000..2388c50c2b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/062.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=13, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml
new file mode 100644
index 0000000000..98675b9040
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<![INCLUDE[ ]]>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml.ref
new file mode 100644
index 0000000000..c0c9152f3e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/063.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=3, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml
new file mode 100644
index 0000000000..3888c46b8b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST e a1 CDATA"foo">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml.ref
new file mode 100644
index 0000000000..11ba2bdc47
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/064.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=21, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml
new file mode 100644
index 0000000000..da9cafd137
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1(foo|bar) #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml.ref
new file mode 100644
index 0000000000..c91f8597df
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/065.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=17, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml
new file mode 100644
index 0000000000..9c09eb4e5d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 (foo|bar)#IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml.ref
new file mode 100644
index 0000000000..f044a71dd9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/066.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=27, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml
new file mode 100644
index 0000000000..7e0809bd34
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 (foo)"foo">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml.ref
new file mode 100644
index 0000000000..519e67fc02
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/067.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=23, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml
new file mode 100644
index 0000000000..53a80a83a8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 NOTATION(foo) #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml.ref
new file mode 100644
index 0000000000..aa7a9e3957
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/068.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=26, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml
new file mode 100644
index 0000000000..6f891dd5e1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!NOTATION eps SYSTEM "eps.exe">
+<!-- missing space before NDATA -->
+<!ENTITY foo SYSTEM "foo.eps"NDATA eps>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml.ref
new file mode 100644
index 0000000000..4d729c5075
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/069.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="eps", publicId="", systemId="eps.exe")
+ comment(ch=" missing space before NDATA ")
+ fatalError(exception={columnNumber=30, lineNumber=4, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml
new file mode 100644
index 0000000000..faf4b0ae4c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml
@@ -0,0 +1,2 @@
+<!-- a comment ending with three dashes --->
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml.ref
new file mode 100644
index 0000000000..f24226f8e5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/070.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=43, lineNumber=1, publicId="", systemId="", message="error occurred while parsing comment"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml
new file mode 100644
index 0000000000..5bd3908968
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "&e3;">
+<!ENTITY e3 "&e1;">
+]>
+<doc>&e1;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml.ref
new file mode 100644
index 0000000000..da8c9347b2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/071.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="&e3;")
+ internatlEntityDecl(name="e3", value="&e1;")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=9, lineNumber=6, publicId="", systemId="", message="recursive entities"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml
new file mode 100644
index 0000000000..743ba79429
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml
@@ -0,0 +1 @@
+<doc>&foo;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml.ref
new file mode 100644
index 0000000000..48fd72baf3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/072.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ skippedEntity(name="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml
new file mode 100644
index 0000000000..2578af42ec
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "whatever">
+]>
+<doc>&f;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml.ref
new file mode 100644
index 0000000000..b60c7d49ac
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/073.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="whatever")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ skippedEntity(name="f")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml
new file mode 100644
index 0000000000..f8abaeb22c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e "</foo><foo>">
+]>
+<doc>
+<foo>&e;</foo>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml.ref
new file mode 100644
index 0000000000..df8552d646
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/074.xml.ref
@@ -0,0 +1,14 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="</foo><foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ characters(ch="\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml
new file mode 100644
index 0000000000..d3dbf50ed6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "&e3;">
+<!ENTITY e3 "&e1;">
+]>
+<doc a="&e1;"></doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml.ref
new file mode 100644
index 0000000000..5d8b1797b5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/075.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="&e3;")
+ internatlEntityDecl(name="e3", value="&e1;")
+ endDTD()
+ fatalError(exception={columnNumber=12, lineNumber=6, publicId="", systemId="", message="recursive entities"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml
new file mode 100644
index 0000000000..60546720e7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml
@@ -0,0 +1 @@
+<doc a="&foo;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml.ref
new file mode 100644
index 0000000000..6a8b31965b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/076.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ skippedEntity(name="foo")
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value=""}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml
new file mode 100644
index 0000000000..f8ac23a5a2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY foo "&bar;">
+]>
+<doc a="&foo;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml.ref
new file mode 100644
index 0000000000..4458152467
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/077.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="foo", value="&bar;")
+ endDTD()
+ skippedEntity(name="bar")
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value=""}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml
new file mode 100644
index 0000000000..446cd85ef9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA "&foo;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml.ref
new file mode 100644
index 0000000000..985f71ca2b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/078.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ skippedEntity(name="foo")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml
new file mode 100644
index 0000000000..da016fd3b2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "&e3;">
+<!ENTITY e3 "&e1;">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA "&e1;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml.ref
new file mode 100644
index 0000000000..a59833714d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/079.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="&e3;")
+ internatlEntityDecl(name="e3", value="&e1;")
+ fatalError(exception={columnNumber=27, lineNumber=6, publicId="", systemId="", message="recursive entities"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml
new file mode 100644
index 0000000000..fa4b9e428d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "&e3;">
+<!ENTITY e3 "&e1;">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #FIXED "&e1;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml.ref
new file mode 100644
index 0000000000..13ee47bdf4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/080.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="&e3;")
+ internatlEntityDecl(name="e3", value="&e1;")
+ fatalError(exception={columnNumber=34, lineNumber=6, publicId="", systemId="", message="recursive entities"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml
new file mode 100644
index 0000000000..d676100e8a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e SYSTEM "nul">
+]>
+<doc a="&e;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml.ref
new file mode 100644
index 0000000000..4d386e4f34
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/081.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="nul")
+ endDTD()
+ fatalError(exception={columnNumber=11, lineNumber=4, publicId="", systemId="", message="external parsed general entity reference not allowed in attribute value"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml
new file mode 100644
index 0000000000..3217d6f8b4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e SYSTEM "nul">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA "&e;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml.ref
new file mode 100644
index 0000000000..eb81754e50
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/082.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="nul")
+ fatalError(exception={columnNumber=26, lineNumber=4, publicId="", systemId="", message="external parsed general entity reference not allowed in attribute value"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml
new file mode 100644
index 0000000000..469d43fd42
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e SYSTEM "nul" NDATA n>
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml.ref
new file mode 100644
index 0000000000..ac1caa8f9c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/083.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ unparsedEntityDecl(name="e", publicId="", systemId="nul", notationName="n")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=4, publicId="", systemId="", message="unparsed entity reference in wrong context"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml
new file mode 100644
index 0000000000..abbbcdea69
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e SYSTEM "nul" NDATA n>
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA "&e;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml.ref
new file mode 100644
index 0000000000..9f69b94ccf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/084.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ unparsedEntityDecl(name="e", publicId="", systemId="nul", notationName="n")
+ fatalError(exception={columnNumber=26, lineNumber=4, publicId="", systemId="", message="unparsed entity reference in wrong context"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml
new file mode 100644
index 0000000000..ac0aeca3e4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc PUBLIC "[" "null.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml.ref
new file mode 100644
index 0000000000..4db671e035
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/085.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="[", systemId="null.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml
new file mode 100644
index 0000000000..df6adfd884
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY foo PUBLIC "[" "null.xml">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml.ref
new file mode 100644
index 0000000000..6254d59e0f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/086.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="foo", publicId="[", systemId="null.xml")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml
new file mode 100644
index 0000000000..ed49492a7a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!NOTATION foo PUBLIC "[" "null.ent">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml.ref
new file mode 100644
index 0000000000..8ec0ab3a12
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/087.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="foo", publicId="[", systemId="null.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml
new file mode 100644
index 0000000000..da0a68c401
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+<!ENTITY e '"'>
+]>
+<doc a="&e;></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml.ref
new file mode 100644
index 0000000000..27ed4e589d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/088.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ internatlEntityDecl(name="e", value="\"")
+ endDTD()
+ fatalError(exception={columnNumber=13, lineNumber=6, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml
new file mode 100644
index 0000000000..0c6cf404c2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY % foo SYSTEM "foo.xml" NDATA bar>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml.ref
new file mode 100644
index 0000000000..910213bf13
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/089.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%foo", publicId="", systemId="foo.xml")
+ fatalError(exception={columnNumber=33, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml
new file mode 100644
index 0000000000..3fb72f3cc0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<foo a='&#60;'></foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml.ref
new file mode 100644
index 0000000000..bc4280aa82
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/090.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo a='<'></foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=4, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml
new file mode 100644
index 0000000000..a61d0914f8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!NOTATION n SYSTEM "n">
+<!ENTITY % foo SYSTEM "foo.xml" NDATA n>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml.ref
new file mode 100644
index 0000000000..c89444077e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/091.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="n", publicId="", systemId="n")
+ externalEntityDecl(name="%foo", publicId="", systemId="foo.xml")
+ fatalError(exception={columnNumber=33, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml
new file mode 100644
index 0000000000..be5266dada
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<foo a='&#38;'></foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml.ref
new file mode 100644
index 0000000000..4469beb325
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/092.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo a='&'></foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=4, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml
new file mode 100644
index 0000000000..4af61bc645
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml
@@ -0,0 +1 @@
+<doc>&#X58;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml.ref
new file mode 100644
index 0000000000..a885634000
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/093.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=1, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml
new file mode 100644
index 0000000000..bdec7a4660
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml
@@ -0,0 +1,2 @@
+<?xml VERSION="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml.ref
new file mode 100644
index 0000000000..f37fb5877f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/094.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=20, lineNumber=1, publicId="", systemId="", message="version expected while reading the XML declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml
new file mode 100644
index 0000000000..090b8b4eec
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml
@@ -0,0 +1,2 @@
+<?xml encoding="UTF-8" version="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml.ref
new file mode 100644
index 0000000000..8852f79579
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/095.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=23, lineNumber=1, publicId="", systemId="", message="version expected while reading the XML declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml
new file mode 100644
index 0000000000..d806c3b952
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"encoding="UTF-8" ?>
+<doc></doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml.ref
new file mode 100644
index 0000000000..ddca718431
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/096.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=20, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml
new file mode 100644
index 0000000000..d4def544b0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0' encoding="UTF-8" ?>
+<doc></doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml.ref
new file mode 100644
index 0000000000..962de94d11
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/097.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=31, lineNumber=1, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml
new file mode 100644
index 0000000000..9798496aa3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" version="1.0"?>
+<doc></doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml.ref
new file mode 100644
index 0000000000..c1665a4f03
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/098.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=34, lineNumber=1, publicId="", systemId="", message="encoding declaration or standalone declaration expected while reading the XML declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml
new file mode 100644
index 0000000000..d5be08eff0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" valid="no" ?>
+<doc></doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml.ref
new file mode 100644
index 0000000000..2d4e8516bc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/099.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=31, lineNumber=1, publicId="", systemId="", message="encoding declaration or standalone declaration expected while reading the XML declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml
new file mode 100644
index 0000000000..51e06231c2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="YES" ?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml.ref
new file mode 100644
index 0000000000..eba06f283c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/100.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=37, lineNumber=1, publicId="", systemId="", message="wrong value for standalone declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml
new file mode 100644
index 0000000000..afa5a455fc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding=" UTF-8"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml.ref
new file mode 100644
index 0000000000..068a6ae657
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/101.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding=' UTF-8'")
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml
new file mode 100644
index 0000000000..8734adaa6e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0 " ?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml.ref
new file mode 100644
index 0000000000..86b6ce0d3a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/102.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0 '")
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml
new file mode 100644
index 0000000000..6c4716798f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#60;foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml.ref
new file mode 100644
index 0000000000..7a82f96305
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/103.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ fatalError(exception={columnNumber=14, lineNumber=4, publicId="", systemId="", message="tag mismatch"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml
new file mode 100644
index 0000000000..dd57396239
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<foo>">
+]>
+<doc>&e;</foo></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml.ref
new file mode 100644
index 0000000000..8059be12c8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/104.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml
new file mode 100644
index 0000000000..809e705870
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml
@@ -0,0 +1,4 @@
+<?pi stuff?>
+<![CDATA[]]>
+<doc>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml.ref
new file mode 100644
index 0000000000..ff94b32716
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/105.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="pi", data="stuff")
+ fatalError(exception={columnNumber=3, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml
new file mode 100644
index 0000000000..d32319ef09
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml
@@ -0,0 +1,2 @@
+<?pi data?>
+&#32;<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml.ref
new file mode 100644
index 0000000000..e5c6c6b6a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/106.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="pi", data="data")
+ fatalError(exception={columnNumber=1, lineNumber=2, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml
new file mode 100644
index 0000000000..3dfd8200e2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<![CDATA[]]>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml.ref
new file mode 100644
index 0000000000..c0c9152f3e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/107.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=3, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml
new file mode 100644
index 0000000000..af5cf50d48
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml
@@ -0,0 +1,3 @@
+<doc>
+<![CDATA [ ]]>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml.ref
new file mode 100644
index 0000000000..3be3623019
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/108.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=9, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml
new file mode 100644
index 0000000000..5afc03e8db
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<doc></doc>">
+]>
+&e;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml.ref
new file mode 100644
index 0000000000..13140d8022
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/109.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<doc></doc>")
+ endDTD()
+ fatalError(exception={columnNumber=1, lineNumber=4, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml
new file mode 100644
index 0000000000..cf54ebe5c0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "">
+]>
+<doc></doc>
+&e;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml.ref
new file mode 100644
index 0000000000..aa5b66c13f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/110.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=1, lineNumber=5, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml
new file mode 100644
index 0000000000..84a469f5d1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "foo='bar'">
+]>
+<doc &e;></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml.ref
new file mode 100644
index 0000000000..d611ecd0df
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/111.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="foo='bar'")
+ endDTD()
+ fatalError(exception={columnNumber=6, lineNumber=4, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml
new file mode 100644
index 0000000000..0c5c1a4341
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml
@@ -0,0 +1,3 @@
+<doc>
+<![cdata[data]]>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml.ref
new file mode 100644
index 0000000000..db6c1f3fe7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/112.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=4, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml
new file mode 100644
index 0000000000..04fc9d2318
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY % foo "&">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml.ref
new file mode 100644
index 0000000000..af3a1378d1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/113.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=18, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml
new file mode 100644
index 0000000000..1261ee49e1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY foo "&">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml.ref
new file mode 100644
index 0000000000..611a07b6a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/114.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=16, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml
new file mode 100644
index 0000000000..f111dbe153
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#38;">
+]>
+<doc a="&e;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml.ref
new file mode 100644
index 0000000000..d4a1b97e12
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/115.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&")
+ endDTD()
+ fatalError(exception={columnNumber=12, lineNumber=4, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml
new file mode 100644
index 0000000000..84bb762fdf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#38;#9">
+]>
+<doc>&e;7;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml.ref
new file mode 100644
index 0000000000..f69ee0b24e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/116.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&#9")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="a")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml
new file mode 100644
index 0000000000..e4a5e572ef
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#38;">
+]>
+<doc>&e;#97;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml.ref
new file mode 100644
index 0000000000..9c54b53b28
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/117.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="a")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml
new file mode 100644
index 0000000000..494d53d208
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "#">
+]>
+<doc>&&e;97;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml.ref
new file mode 100644
index 0000000000..714b497120
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/118.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="#")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=7, lineNumber=4, publicId="", systemId="", message="error occurred while parsing reference"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml
new file mode 100644
index 0000000000..aefaa44a1c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#38;">
+]>
+<doc>
+&e;#38;
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml.ref
new file mode 100644
index 0000000000..625f318be6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/119.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n&\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml
new file mode 100644
index 0000000000..b7d6ff9ce9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#38;">
+]>
+<doc>
+&e;
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml.ref
new file mode 100644
index 0000000000..56edb37c66
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/120.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=4, lineNumber=5, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml
new file mode 100644
index 0000000000..2b4adcc6b4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY #DEFAULT "default">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml.ref
new file mode 100644
index 0000000000..a9f2c8f68d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/121.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=10, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml
new file mode 100644
index 0000000000..ef0b057cee
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a, (b) | c)?>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/122.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml
new file mode 100644
index 0000000000..06d65f045b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc ((doc?)))>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml.ref
new file mode 100644
index 0000000000..66978b93a8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/123.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=23, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml
new file mode 100644
index 0000000000..3bbe0f91a6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (doc|#PCDATA)*>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml.ref
new file mode 100644
index 0000000000..dc05a44ce5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/124.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=20, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml
new file mode 100644
index 0000000000..5f9c22c0c6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc ((#PCDATA))>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml.ref
new file mode 100644
index 0000000000..b60c5515b1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/125.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=17, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml
new file mode 100644
index 0000000000..13e74d6d5e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)+>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml.ref
new file mode 100644
index 0000000000..03465a21d5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/126.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=24, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml
new file mode 100644
index 0000000000..a379b9e539
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)?>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml.ref
new file mode 100644
index 0000000000..03465a21d5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/127.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=24, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml
new file mode 100644
index 0000000000..dd706bb21f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc CDATA>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml.ref
new file mode 100644
index 0000000000..45764a1653
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/128.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=15, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml
new file mode 100644
index 0000000000..d4e4461a6d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc - - (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml.ref
new file mode 100644
index 0000000000..45764a1653
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/129.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=15, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml
new file mode 100644
index 0000000000..fa7be641f1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (doc?) +(foo)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml.ref
new file mode 100644
index 0000000000..ad943c6e9e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/130.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=22, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml
new file mode 100644
index 0000000000..f34ed453b5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (doc?) -(foo)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml.ref
new file mode 100644
index 0000000000..ad943c6e9e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/131.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=22, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml
new file mode 100644
index 0000000000..ab6cc416e9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a, (b, c), (d, (e, f) | g))?>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/132.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml
new file mode 100644
index 0000000000..d2aa604e9f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a *)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml.ref
new file mode 100644
index 0000000000..d0b59c54cc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/133.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=18, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml
new file mode 100644
index 0000000000..c8919c5ef8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a) *>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml.ref
new file mode 100644
index 0000000000..9da787c53b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/134.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=19, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml
new file mode 100644
index 0000000000..e639e8b6ea
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a & b)?>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml.ref
new file mode 100644
index 0000000000..d0b59c54cc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/135.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=18, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml
new file mode 100644
index 0000000000..499e68bcea
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc O O (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml.ref
new file mode 100644
index 0000000000..45764a1653
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/136.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=15, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml
new file mode 100644
index 0000000000..723b77f776
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc(#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml.ref
new file mode 100644
index 0000000000..58b922aec8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/137.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=14, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml
new file mode 100644
index 0000000000..16934cc88e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (doc*?)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml.ref
new file mode 100644
index 0000000000..51b93a743e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/138.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=20, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml
new file mode 100644
index 0000000000..34df52ed93
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc ()>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml.ref
new file mode 100644
index 0000000000..5344a45ef8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/139.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=16, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml
new file mode 100644
index 0000000000..467d5ed301
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<&#x309a;></&#x309a;>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml.ref
new file mode 100644
index 0000000000..123df1a99c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/140.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<゚></゚>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=4, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml
new file mode 100644
index 0000000000..409d0a7568
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "<X&#xe5c;></X&#xe5c;>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml.ref
new file mode 100644
index 0000000000..1b6d92115a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/141.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<X๜></X๜>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=4, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml
new file mode 100644
index 0000000000..20e88f88b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#0;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml.ref
new file mode 100644
index 0000000000..7ce4da6a06
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/142.xml.ref
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml
new file mode 100644
index 0000000000..0ee1c614f8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#31;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml.ref
new file mode 100644
index 0000000000..664bfb7111
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/143.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml
new file mode 100644
index 0000000000..437548c0ba
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#xFFFF;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml.ref
new file mode 100644
index 0000000000..8d3143070d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/144.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="￿")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml
new file mode 100644
index 0000000000..71b187a933
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#xD800;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml.ref
new file mode 100644
index 0000000000..279ece7657
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/145.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml
new file mode 100644
index 0000000000..d0bfbca723
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#x110000;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml.ref
new file mode 100644
index 0000000000..7ce4da6a06
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/146.xml.ref
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml
new file mode 100644
index 0000000000..3b6145615f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml
@@ -0,0 +1,3 @@
+
+<?xml version="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml.ref
new file mode 100644
index 0000000000..dd85a80374
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/147.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=2, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml
new file mode 100644
index 0000000000..774dce18fd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml
@@ -0,0 +1,3 @@
+<!-- -->
+<?xml version="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml.ref
new file mode 100644
index 0000000000..9b58eb0b49
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/148.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ comment(ch=" ")
+ fatalError(exception={columnNumber=6, lineNumber=2, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml
new file mode 100644
index 0000000000..725eea0dec
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<?xml version="1.0"?>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml.ref
new file mode 100644
index 0000000000..aa73988e09
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/149.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=6, lineNumber=3, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml
new file mode 100644
index 0000000000..44f6b6df92
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml
@@ -0,0 +1,3 @@
+<doc>
+<?xml version="1.0"?>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml.ref
new file mode 100644
index 0000000000..2bc5abe271
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/150.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=6, lineNumber=2, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml
new file mode 100644
index 0000000000..fecc4f24e3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml
@@ -0,0 +1,3 @@
+<doc>
+</doc>
+<?xml version="1.0"?>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml.ref
new file mode 100644
index 0000000000..e5d98b1232
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/151.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ fatalError(exception={columnNumber=6, lineNumber=3, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml
new file mode 100644
index 0000000000..b5c5cb26ae
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml
@@ -0,0 +1,2 @@
+<?xml encoding="UTF-8"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml.ref
new file mode 100644
index 0000000000..8852f79579
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/152.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=23, lineNumber=1, publicId="", systemId="", message="version expected while reading the XML declaration"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml
new file mode 100644
index 0000000000..5e2973707e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "<?xml encoding='UTF-8'?>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml.ref
new file mode 100644
index 0000000000..1198fe07c6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/153.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<?xml encoding='UTF-8'?>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=8, lineNumber=5, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml
new file mode 100644
index 0000000000..96e01d63f5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml
@@ -0,0 +1,2 @@
+<?XML version="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml.ref
new file mode 100644
index 0000000000..74a9eb1488
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/154.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml
new file mode 100644
index 0000000000..4f16d0f163
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml
@@ -0,0 +1,2 @@
+<?xmL version="1.0"?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml.ref
new file mode 100644
index 0000000000..74a9eb1488
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/155.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml
new file mode 100644
index 0000000000..c6d93fd312
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml
@@ -0,0 +1,3 @@
+<doc>
+<?xMl version="1.0"?>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml.ref
new file mode 100644
index 0000000000..2bc5abe271
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/156.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=6, lineNumber=2, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml
new file mode 100644
index 0000000000..2f058dac3e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml
@@ -0,0 +1,3 @@
+<doc>
+<?xmL?>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml.ref
new file mode 100644
index 0000000000..2bc5abe271
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/157.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ fatalError(exception={columnNumber=6, lineNumber=2, publicId="", systemId="", message="invalid name for processing instruction"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml
new file mode 100644
index 0000000000..32b90b722d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!NOTATION gif PUBLIC "image/gif" "">
+<!ATTLIST #NOTATION gif a1 CDATA #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml.ref
new file mode 100644
index 0000000000..38210c24da
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/158.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="gif", publicId="image/gif", systemId="")
+ fatalError(exception={columnNumber=11, lineNumber=4, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml
new file mode 100644
index 0000000000..066244cb91
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "<![CDATA[Tim & Michael]]>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml.ref
new file mode 100644
index 0000000000..f044a71dd9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/159.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=27, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml
new file mode 100644
index 0000000000..85424acb1b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "">
+<!ENTITY foo "%e;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml.ref
new file mode 100644
index 0000000000..0c1afe80b8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/160.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="")
+ internatlEntityDecl(name="foo", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml
new file mode 100644
index 0000000000..4f8a5b7b6b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e "#PCDATA">
+<!ELEMENT doc (%e;)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml.ref
new file mode 100644
index 0000000000..35ee5e8c6c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/161.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="#PCDATA")
+ fatalError(exception={columnNumber=16, lineNumber=3, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml
new file mode 100644
index 0000000000..efae4b190e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e1 "">
+<!ENTITY % e2 "%e1;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml.ref
new file mode 100644
index 0000000000..a802c74aed
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/162.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e1", value="")
+ internatlEntityDecl(name="%e2", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml
new file mode 100644
index 0000000000..e14fb76c31
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "">
+]>
+%e;
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml.ref
new file mode 100644
index 0000000000..e4c32252dd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/163.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="")
+ endDTD()
+ fatalError(exception={columnNumber=1, lineNumber=5, publicId="", systemId="", message="error occurred while parsing element"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml
new file mode 100644
index 0000000000..98dd267c21
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "">
+] %e; >
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml.ref
new file mode 100644
index 0000000000..80314341d6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/164.xml.ref
@@ -0,0 +1,5 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="")
+ fatalError(exception={columnNumber=3, lineNumber=4, publicId="", systemId="", message="error occurred while parsing document type definition"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml
new file mode 100644
index 0000000000..36c04618ef
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY% e "">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml.ref
new file mode 100644
index 0000000000..64fd8b4d0d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/165.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=9, lineNumber=2, publicId="", systemId="", message="letter is expected"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml
new file mode 100644
index 0000000000..ee2ce28630
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml
@@ -0,0 +1 @@
+<doc>￿</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml.ref
new file mode 100644
index 0000000000..dca4f7b1cd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/166.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml
new file mode 100644
index 0000000000..9bdc6c1278
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml
@@ -0,0 +1 @@
+<doc>￾</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml.ref
new file mode 100644
index 0000000000..dca4f7b1cd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/167.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml
new file mode 100644
index 0000000000..f83221a3ad
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml
@@ -0,0 +1 @@
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml.ref
new file mode 100644
index 0000000000..61659843c1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/168.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml
new file mode 100644
index 0000000000..310029b976
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml
@@ -0,0 +1 @@
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml.ref
new file mode 100644
index 0000000000..78385bd8bc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/169.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml
new file mode 100644
index 0000000000..cfa0aee155
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml
@@ -0,0 +1 @@
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref
new file mode 100644
index 0000000000..0508ee88c7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml
new file mode 100644
index 0000000000..48b5c7d3bc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml
@@ -0,0 +1,2 @@
+<!-- ￿ -->
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml.ref
new file mode 100644
index 0000000000..f729ad3da3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/171.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml
new file mode 100644
index 0000000000..6651d4d299
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml
@@ -0,0 +1,2 @@
+<?pi ￿?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml.ref
new file mode 100644
index 0000000000..f729ad3da3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/172.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=6, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml
new file mode 100644
index 0000000000..f9f9f42023
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml
@@ -0,0 +1 @@
+<doc a="￿"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml.ref
new file mode 100644
index 0000000000..cda5d63d26
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/173.xml.ref
@@ -0,0 +1,3 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ fatalError(exception={columnNumber=9, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml
new file mode 100644
index 0000000000..42bef861c6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml
@@ -0,0 +1 @@
+<doc><![CDATA[￿]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml.ref
new file mode 100644
index 0000000000..5f23fbdcdb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/174.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=15, lineNumber=1, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml
new file mode 100644
index 0000000000..69912f36d2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "￿">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml.ref
new file mode 100644
index 0000000000..27549bc7de
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/175.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=15, lineNumber=3, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml
new file mode 100644
index 0000000000..39153ad5a8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml.ref
new file mode 100644
index 0000000000..4348506993
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/176.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=1, lineNumber=5, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml
new file mode 100644
index 0000000000..6bc8228879
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>A￿</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml.ref
new file mode 100644
index 0000000000..94f3c3b9e5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/177.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ fatalError(exception={columnNumber=7, lineNumber=4, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml
new file mode 100644
index 0000000000..e8f2d18eed
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="&#34;></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml.ref
new file mode 100644
index 0000000000..5aae44a1bf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/178.xml.ref
@@ -0,0 +1,6 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ fatalError(exception={columnNumber=15, lineNumber=5, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml
new file mode 100644
index 0000000000..e8f1f419db
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#34;>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml.ref
new file mode 100644
index 0000000000..a4c6cffd5d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/179.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=1, lineNumber=5, publicId="", systemId="", message="unexpected end of file"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml
new file mode 100644
index 0000000000..569d553a8c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA "&e;">
+<!ENTITY e "v">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml.ref
new file mode 100644
index 0000000000..42542d990e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/180.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ skippedEntity(name="e")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ internatlEntityDecl(name="e", value="v")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml
new file mode 100644
index 0000000000..4341d99ee2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#60;![CDATA[">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&e;]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml.ref
new file mode 100644
index 0000000000..8e1b4457fc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/181.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<![CDATA[")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml
new file mode 100644
index 0000000000..920f431666
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#60;!--">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&e;--></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml.ref
new file mode 100644
index 0000000000..abb11afa92
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/182.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<!--")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ comment(ch="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml
new file mode 100644
index 0000000000..7a5677de54
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA | foo*)* >
+<!ELEMENT foo EMPTY>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml.ref
new file mode 100644
index 0000000000..d49ec689aa
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/183.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=29, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml
new file mode 100644
index 0000000000..103384a06e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA | (foo))* >
+<!ELEMENT foo EMPTY>
+]>
+<doc></doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml.ref
new file mode 100644
index 0000000000..8d879bf2e6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/184.xml.ref
@@ -0,0 +1,4 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ fatalError(exception={columnNumber=26, lineNumber=2, publicId="", systemId="", message="unexpected character"})
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.ent
new file mode 100644
index 0000000000..e557426454
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.ent
@@ -0,0 +1 @@
+<!ELEMENT doc (#PCDATA)>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml
new file mode 100644
index 0000000000..81d5ef4bcd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE doc SYSTEM "185.ent">
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml.ref
new file mode 100644
index 0000000000..7f5838399b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/185.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' standalone='yes'")
+ startDTD(name="doc", publicId="", systemId="185.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml
new file mode 100644
index 0000000000..85b26ec0a2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE a [
+<!ELEMENT a EMPTY>
+<!ATTLIST a b CDATA #IMPLIED d CDATA #IMPLIED>
+]>
+<a b="c"d="e"/>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml.ref
new file mode 100644
index 0000000000..63d0d3e3f6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/186.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="a", publicId="", systemId="")
+ attributeDecl(eName="a", aName="b", type="", valueDefault="", value="")
+ attributeDecl(eName="a", aName="d", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="a", qName="a", atts=[{localName="b", qName="b", uri="", type="CDATA", value="c"}, {localName="d", qName="d", uri="", type="CDATA", value="e"}])
+ endElement(namespaceURI="", localName="a", qName="a")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/null.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/null.ent
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/null.ent
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.ent
new file mode 100755
index 0000000000..1cff3fd44f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.ent
@@ -0,0 +1 @@
+Data
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml
new file mode 100644
index 0000000000..147d70d2d1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "001.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml.ref
new file mode 100644
index 0000000000..355c937e11
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="001.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="001.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.ent
new file mode 100755
index 0000000000..45f6d8e74e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.ent
@@ -0,0 +1 @@
+Data \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml
new file mode 100644
index 0000000000..9eaf91724f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "002.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml.ref
new file mode 100644
index 0000000000..f843995646
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="002.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="002.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.ent
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.ent
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml
new file mode 100644
index 0000000000..bb60b663ef
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "003.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml.ref
new file mode 100644
index 0000000000..79d3531637
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="003.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="003.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.ent
new file mode 100755
index 0000000000..3436f20001
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.ent
@@ -0,0 +1 @@
+Data \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml
new file mode 100644
index 0000000000..074498ce19
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "004.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml.ref
new file mode 100644
index 0000000000..38abcb2fc6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="004.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="004.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.ent
new file mode 100755
index 0000000000..c6e97f821f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.ent
@@ -0,0 +1 @@
+<e/><e/><e/> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml
new file mode 100644
index 0000000000..82a6228205
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (e*)>
+<!ELEMENT e EMPTY>
+<!ENTITY e SYSTEM "005.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml.ref
new file mode 100644
index 0000000000..2601030f2a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="005.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="005.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.ent
new file mode 100755
index 0000000000..4df2f0c2ac
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.ent
@@ -0,0 +1,4 @@
+Data
+<e/>
+More data
+<e/>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml
new file mode 100644
index 0000000000..0b326cad4c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA|e)*>
+<!ELEMENT e EMPTY>
+<!ENTITY e SYSTEM "006.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml.ref
new file mode 100644
index 0000000000..17fd238b67
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="006.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="006.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.ent
new file mode 100755
index 0000000000..ab1d696dd7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.ent
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml
new file mode 100644
index 0000000000..825e3b286a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "007.ent">
+]>
+<doc>X&e;Z</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml.ref
new file mode 100644
index 0000000000..81e7ccdaf3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="007.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="007.ent", ret={})
+ skippedEntity(name="e")
+ characters(ch="XZ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.ent
new file mode 100755
index 0000000000..c6ca61f9c8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.ent
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml
new file mode 100644
index 0000000000..3c001b6cb3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "008.ent">
+]>
+<doc>X&e;Z</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml.ref
new file mode 100644
index 0000000000..eb7f1086e1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="008.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="008.ent", ret={})
+ skippedEntity(name="e")
+ characters(ch="XZ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.ent
new file mode 100755
index 0000000000..67c3297611
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.ent
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml
new file mode 100644
index 0000000000..a5866e5a77
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "009.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml.ref
new file mode 100644
index 0000000000..5c294de017
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="009.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="009.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.ent
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.ent
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml
new file mode 100644
index 0000000000..418e9b0141
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "010.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml.ref
new file mode 100644
index 0000000000..4dc03c6dba
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="010.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="010.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.ent
new file mode 100755
index 0000000000..b19be3a497
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.ent
@@ -0,0 +1 @@
+xyzzy
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml
new file mode 100644
index 0000000000..2ceefa1d21
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e PUBLIC "a not very interesting file" "011.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml.ref
new file mode 100644
index 0000000000..c078139d84
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="a not very interesting file", systemId="011.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="a not very interesting file", systemId="011.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.ent
new file mode 100755
index 0000000000..8eb1fb9c41
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.ent
@@ -0,0 +1 @@
+&e4; \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml
new file mode 100644
index 0000000000..5a8f009b4a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE doc [
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "&e3;">
+<!ENTITY e3 SYSTEM "012.ent">
+<!ENTITY e4 "&e5;">
+<!ENTITY e5 "(e5)">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&e1;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml.ref
new file mode 100644
index 0000000000..2af77a3b99
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml.ref
@@ -0,0 +1,14 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="&e3;")
+ externalEntityDecl(name="e3", publicId="", systemId="012.ent")
+ internatlEntityDecl(name="e4", value="&e5;")
+ internatlEntityDecl(name="e5", value="(e5)")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="012.ent", ret={})
+ skippedEntity(name="e3")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.ent
new file mode 100755
index 0000000000..7f25c502dd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.ent
@@ -0,0 +1 @@
+<e/> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml
new file mode 100644
index 0000000000..7717c97afe
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (e)>
+<!ELEMENT e (#PCDATA)>
+<!ATTLIST e
+ a1 CDATA "a1 default"
+ a2 NMTOKENS "a2 default"
+>
+<!ENTITY x SYSTEM "013.ent">
+]>
+<doc>&x;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml.ref
new file mode 100644
index 0000000000..92fb65a2d2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml.ref
@@ -0,0 +1,12 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="e", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="e", aName="a2", type="", valueDefault="", value="")
+ externalEntityDecl(name="x", publicId="", systemId="013.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="013.ent", ret={})
+ skippedEntity(name="x")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.ent
new file mode 100755
index 0000000000..470fd6fe44
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.ent
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml
new file mode 100644
index 0000000000..816fd1e796
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e SYSTEM "014.ent">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml.ref
new file mode 100644
index 0000000000..a087786e69
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId="", systemId="014.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ resolveEntity(publicId="", systemId="014.ent", ret={})
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml
new file mode 100644
index 0000000000..e91a10895e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!DOCTYPE foo SYSTEM "foo.dtd" [
+ <!ENTITY def "foo">
+]>
+<foo>
+ <!-- check that the call to skippedEntity() is inserted in the right place -->
+ <a>abc&undef;gh</a>
+ <b>&undef;gh</b>
+ <c>abc&undef;</c>
+ <d>&undef;</d>
+ <e>&undef;&def;&undef;&def;</e>
+ <e>a&undef;b&def;c&undef;d&def;e</e>
+</foo>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml.ref
new file mode 100644
index 0000000000..67f1fbe808
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml.ref
@@ -0,0 +1,47 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='UTF-8' standalone='no'")
+ startDTD(name="foo", publicId="", systemId="foo.dtd")
+ internatlEntityDecl(name="def", value="foo")
+ endDTD()
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ characters(ch="\n ")
+ comment(ch=" check that the call to skippedEntity() is inserted in the right place ")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ characters(ch="abc")
+ skippedEntity(name="undef")
+ characters(ch="gh")
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="b", qName="b", atts=[])
+ skippedEntity(name="undef")
+ characters(ch="gh")
+ endElement(namespaceURI="", localName="b", qName="b")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="c", qName="c", atts=[])
+ characters(ch="abc")
+ skippedEntity(name="undef")
+ endElement(namespaceURI="", localName="c", qName="c")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="d", qName="d", atts=[])
+ skippedEntity(name="undef")
+ endElement(namespaceURI="", localName="d", qName="d")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[])
+ skippedEntity(name="undef")
+ characters(ch="foo")
+ skippedEntity(name="undef")
+ characters(ch="foo")
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[])
+ characters(ch="a")
+ skippedEntity(name="undef")
+ characters(ch="bfooc")
+ skippedEntity(name="undef")
+ characters(ch="dfooe")
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\n")
+ endElement(namespaceURI="", localName="foo", qName="foo")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml
new file mode 100644
index 0000000000..a1fb393371
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!DOCTYPE foo SYSTEM "foo.dtd" [
+ <!ENTITY a1 "&a2;">
+ <!ENTITY a2 "&a3;">
+ <!ENTITY def "foo">
+]>
+<foo>
+ <a>abc&a1;gh</a>
+ <b>&a1;gh</b>
+ <c>abc&a1;</c>
+ <d>&a1;</d>
+ <e>&a1;&def;&a1;&def;</e>
+ <e>a&a1;b&def;c&a1;d&def;e</e>
+</foo>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml.ref
new file mode 100644
index 0000000000..a7ed3a2848
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml.ref
@@ -0,0 +1,47 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='UTF-8' standalone='no'")
+ startDTD(name="foo", publicId="", systemId="foo.dtd")
+ internatlEntityDecl(name="a1", value="&a2;")
+ internatlEntityDecl(name="a2", value="&a3;")
+ internatlEntityDecl(name="def", value="foo")
+ endDTD()
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ characters(ch="abc")
+ skippedEntity(name="a3")
+ characters(ch="gh")
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="b", qName="b", atts=[])
+ skippedEntity(name="a3")
+ characters(ch="gh")
+ endElement(namespaceURI="", localName="b", qName="b")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="c", qName="c", atts=[])
+ characters(ch="abc")
+ skippedEntity(name="a3")
+ endElement(namespaceURI="", localName="c", qName="c")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="d", qName="d", atts=[])
+ skippedEntity(name="a3")
+ endElement(namespaceURI="", localName="d", qName="d")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[])
+ skippedEntity(name="a3")
+ characters(ch="foo")
+ skippedEntity(name="a3")
+ characters(ch="foo")
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\n ")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[])
+ characters(ch="a")
+ skippedEntity(name="a3")
+ characters(ch="bfooc")
+ skippedEntity(name="a3")
+ characters(ch="dfooe")
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\n")
+ endElement(namespaceURI="", localName="foo", qName="foo")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml
new file mode 100644
index 0000000000..ae745d4da1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!DOCTYPE foo SYSTEM "foo.dtd" [
+ <!ENTITY a1 "&a2;">
+ <!ENTITY a2 "&a3;">
+ <!ENTITY def "foo">
+]>
+<foo>
+ <a attr="foo&a1;bar&def;ding"/>
+</foo>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml.ref
new file mode 100644
index 0000000000..09f8e96b9c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml.ref
@@ -0,0 +1,16 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='UTF-8' standalone='no'")
+ startDTD(name="foo", publicId="", systemId="foo.dtd")
+ internatlEntityDecl(name="a1", value="&a2;")
+ internatlEntityDecl(name="a2", value="&a3;")
+ internatlEntityDecl(name="def", value="foo")
+ endDTD()
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ characters(ch="\n ")
+ skippedEntity(name="a3")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[{localName="attr", qName="attr", uri="", type="CDATA", value="foobarfooding"}])
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\n")
+ endElement(namespaceURI="", localName="foo", qName="foo")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.ent
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.ent
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml
new file mode 100644
index 0000000000..2d6f41a137
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "001.ent" [
+<!ELEMENT doc EMPTY>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml.ref
new file mode 100644
index 0000000000..eea47ce41b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/001.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="001.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.ent
new file mode 100755
index 0000000000..67c3297611
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.ent
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml
new file mode 100644
index 0000000000..023fce8499
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "002.ent" [
+<!ELEMENT doc EMPTY>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml.ref
new file mode 100644
index 0000000000..cbaf6dc22d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/002.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="002.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-1.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-1.ent
new file mode 100755
index 0000000000..931f3ad6d8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-1.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc EMPTY>
+<!ENTITY % e SYSTEM "003-2.ent">
+<!ATTLIST doc a1 CDATA %e; "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-2.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-2.ent
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003-2.ent
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml
new file mode 100644
index 0000000000..63a5e8bdfc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "003-1.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml.ref
new file mode 100644
index 0000000000..4f83c741fb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/003.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="003-1.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-1.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-1.ent
new file mode 100755
index 0000000000..40f7ff58a2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-1.ent
@@ -0,0 +1,4 @@
+<!ELEMENT doc EMPTY>
+<!ENTITY % e1 SYSTEM "004-2.ent">
+<!ENTITY % e2 "%e1;">
+%e1;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-2.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-2.ent
new file mode 100755
index 0000000000..61def75cb7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004-2.ent
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "value">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml
new file mode 100644
index 0000000000..adc9201496
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "004-1.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml.ref
new file mode 100644
index 0000000000..e2d3af888e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/004.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="004-1.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-1.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-1.ent
new file mode 100755
index 0000000000..ade9599032
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-1.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc EMPTY>
+<!ENTITY % e SYSTEM "005-2.ent">
+%e;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-2.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-2.ent
new file mode 100755
index 0000000000..bef50b1f38
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005-2.ent
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml
new file mode 100644
index 0000000000..6bd44cfee0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "005-1.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml.ref
new file mode 100644
index 0000000000..8057322cf2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/005.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="005-1.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.ent
new file mode 100755
index 0000000000..8f305a82bd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc EMPTY>
+<!ATTLIST doc a1 CDATA "w1" a2 CDATA "w2">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml
new file mode 100644
index 0000000000..eb80bb7409
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "006.ent" [
+<!ATTLIST doc a1 CDATA "v1">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml.ref
new file mode 100644
index 0000000000..e2e2584353
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/006.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="006.ent")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.ent
new file mode 100755
index 0000000000..fbf4ca4947
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml
new file mode 100644
index 0000000000..38897e34ea
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "007.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml.ref
new file mode 100644
index 0000000000..d96790fb37
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/007.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="007.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.ent
new file mode 100755
index 0000000000..fbf4ca4947
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml
new file mode 100644
index 0000000000..bf777a7ff2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc PUBLIC "whatever" "008.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml.ref
new file mode 100644
index 0000000000..08ba9c035b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/008.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="whatever", systemId="008.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.ent
new file mode 100755
index 0000000000..fbf4ca4947
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml
new file mode 100644
index 0000000000..c17562fe68
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc PUBLIC "whatever" "009.ent" [
+<!ATTLIST doc a2 CDATA "v2">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml.ref
new file mode 100644
index 0000000000..d789785173
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/009.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="whatever", systemId="009.ent")
+ attributeDecl(eName="doc", aName="a2", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.ent
new file mode 100755
index 0000000000..52a28f5deb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v2">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml
new file mode 100644
index 0000000000..2786b328f3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "010.ent" [
+<!ATTLIST doc a1 CDATA "v1">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml.ref
new file mode 100644
index 0000000000..6045d46296
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/010.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="010.ent")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.ent
new file mode 100755
index 0000000000..fbf4ca4947
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml
new file mode 100644
index 0000000000..03b482bbb6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e SYSTEM "011.ent">
+%e;
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml.ref
new file mode 100644
index 0000000000..09fd89bd38
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/011.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="", systemId="011.ent")
+ resolveEntity(publicId="", systemId="011.ent", ret={})
+ skippedEntity(name="%e")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.ent
new file mode 100755
index 0000000000..7e372e65e9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.ent
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml
new file mode 100644
index 0000000000..1967edbba7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e SYSTEM "012.ent">
+%e;
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml.ref
new file mode 100644
index 0000000000..8d90b187dd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/012.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="", systemId="012.ent")
+ resolveEntity(publicId="", systemId="012.ent", ret={})
+ skippedEntity(name="%e")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.ent
new file mode 100755
index 0000000000..a3691d9f08
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.ent
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>
+<![ INCLUDE [
+<!ATTLIST doc a1 CDATA "v1">
+]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml
new file mode 100644
index 0000000000..cf44f2600a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "013.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml.ref
new file mode 100644
index 0000000000..d84839e625
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/013.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="013.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.ent
new file mode 100755
index 0000000000..6eaf779329
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.ent
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>
+<![ %e; [
+<!ATTLIST doc a1 CDATA "v1">
+]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml
new file mode 100644
index 0000000000..bd08502489
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "014.ent" [
+<!ENTITY % e "INCLUDE">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml.ref
new file mode 100644
index 0000000000..f9c8220bbb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/014.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="014.ent")
+ internatlEntityDecl(name="%e", value="INCLUDE")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.ent
new file mode 100755
index 0000000000..00d2f30e1d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.ent
@@ -0,0 +1,5 @@
+<!ELEMENT doc (#PCDATA)>
+<![ %e; [
+<!ATTLIST doc a1 CDATA "v1">
+]]>
+<!ATTLIST doc a2 CDATA "v2">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml
new file mode 100644
index 0000000000..e04e75ffca
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "015.ent" [
+<!ENTITY % e "IGNORE">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml.ref
new file mode 100644
index 0000000000..de94a45356
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/015.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="015.ent")
+ internatlEntityDecl(name="%e", value="IGNORE")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.ent
new file mode 100755
index 0000000000..bf77ef8336
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.ent
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>
+<![%e;[
+<!ATTLIST doc a1 CDATA "v1">
+]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml
new file mode 100644
index 0000000000..4ccf4af350
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "016.ent" [
+<!ENTITY % e "INCLUDE">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml.ref
new file mode 100644
index 0000000000..7c234cfc5f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/016.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="016.ent")
+ internatlEntityDecl(name="%e", value="INCLUDE")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.ent
new file mode 100755
index 0000000000..ffd9adde61
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "<!ATTLIST doc a1 CDATA 'v1'>">
+%e;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml
new file mode 100644
index 0000000000..7fe18f4c7a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "017.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml.ref
new file mode 100644
index 0000000000..25cc198610
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/017.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="017.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.ent
new file mode 100755
index 0000000000..2d46f76fc3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "'v1'">
+<!ATTLIST doc a1 CDATA %e;>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml
new file mode 100644
index 0000000000..31e90f2405
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "018.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml.ref
new file mode 100644
index 0000000000..3db7bc846b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/018.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="018.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.ent
new file mode 100755
index 0000000000..d18201a98b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "'v1'">
+<!ATTLIST doc a1 CDATA%e;>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml
new file mode 100644
index 0000000000..b7a18faba0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "019.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml.ref
new file mode 100644
index 0000000000..9961aa93b4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/019.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="019.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.ent
new file mode 100755
index 0000000000..815291c6d2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.ent
@@ -0,0 +1,3 @@
+<!ENTITY % e "doc">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST%e;a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml
new file mode 100644
index 0000000000..d70892f7ad
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "020.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml.ref
new file mode 100644
index 0000000000..fc9a0535c1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/020.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="020.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.ent
new file mode 100755
index 0000000000..9f8f2afd2b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.ent
@@ -0,0 +1,3 @@
+<!ENTITY % e "doc a1 CDATA">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST %e; "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml
new file mode 100644
index 0000000000..70c28730db
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "021.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml.ref
new file mode 100644
index 0000000000..e6d91722d3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/021.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="021.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.ent
new file mode 100755
index 0000000000..26f2d8beb2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.ent
@@ -0,0 +1,3 @@
+<!ENTITY % e "INCLUDE[">
+<!ELEMENT doc (#PCDATA)>
+<![ %e; <!ATTLIST doc a1 CDATA "v1"> ]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml
new file mode 100644
index 0000000000..b639f2551c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "022.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml.ref
new file mode 100644
index 0000000000..de3ddf732f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/022.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="022.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.ent
new file mode 100755
index 0000000000..e3268819f7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.ent
@@ -0,0 +1,5 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e1 "do">
+<!ENTITY % e2 "c">
+<!ENTITY % e3 "%e1;%e2;">
+<!ATTLIST %e3; a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml
new file mode 100644
index 0000000000..1c2484b70b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "023.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml.ref
new file mode 100644
index 0000000000..a150bde52a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/023.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="023.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.ent
new file mode 100755
index 0000000000..aa6d0eccac
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.ent
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e1 "'v1'">
+<!ENTITY % e2 'a1 CDATA %e1;'>
+<!ATTLIST doc %e2;>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml
new file mode 100644
index 0000000000..96e1ecb61b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "024.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml.ref
new file mode 100644
index 0000000000..e97c61bd94
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/024.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="024.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.ent
new file mode 100755
index 0000000000..389d259eb1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.ent
@@ -0,0 +1,5 @@
+<!ELEMENT doc EMPTY>
+<!ENTITY % e "x">
+<!ENTITY % e "y">
+<!ENTITY % v "'%e;'">
+<!ATTLIST doc a1 CDATA %v;>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml
new file mode 100644
index 0000000000..8fdbc14c47
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "025.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml.ref
new file mode 100644
index 0000000000..1eca607181
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/025.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="025.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.ent
new file mode 100755
index 0000000000..bdc93af639
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.ent
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "w1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml
new file mode 100644
index 0000000000..7b109c0913
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc ANY>
+<!ENTITY % e SYSTEM "026.ent">
+%e;
+<!ATTLIST doc a1 CDATA "x1" a2 CDATA "x2">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml.ref
new file mode 100644
index 0000000000..1bea883d9c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/026.xml.ref
@@ -0,0 +1,12 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="", systemId="026.ent")
+ resolveEntity(publicId="", systemId="026.ent", ret={})
+ skippedEntity(name="%e")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="doc", aName="a2", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.ent
new file mode 100755
index 0000000000..712cce3700
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.ent
@@ -0,0 +1,2 @@
+<!ENTITY % e "">
+<!ELEMENT doc (#PCDATA %e;)>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml
new file mode 100644
index 0000000000..d0c8c7abb5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "027.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml.ref
new file mode 100644
index 0000000000..d010327624
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/027.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="027.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.ent
new file mode 100755
index 0000000000..ac249d7b2c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.ent
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>
+<![INCLUDE[<!ATTLIST doc a1 CDATA "v1">]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml
new file mode 100644
index 0000000000..50e5248cbf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "028.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml.ref
new file mode 100644
index 0000000000..8466141897
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/028.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="028.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.ent
new file mode 100755
index 0000000000..df94df5560
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<![IGNORE[<!ATTLIST doc a1 CDATA "v1">]]>
+<!ATTLIST doc a1 CDATA "v2">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml
new file mode 100644
index 0000000000..07e226c1d7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "029.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml.ref
new file mode 100644
index 0000000000..0bffc4aaa7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/029.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="029.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.ent
new file mode 100755
index 0000000000..e3864460df
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<![IGNORE[]]>
+<![INCLUDE[]]>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml
new file mode 100644
index 0000000000..01fc2be4ca
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "030.ent">
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml.ref
new file mode 100644
index 0000000000..51e7f033f9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/030.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="030.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-1.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-1.ent
new file mode 100755
index 0000000000..f7f94ab152
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-1.ent
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e SYSTEM "031-2.ent">
+<!ENTITY e "<![CDATA[%e;]]>">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-2.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-2.ent
new file mode 100755
index 0000000000..bef50b1f38
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031-2.ent
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "v1">
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml
new file mode 100644
index 0000000000..c3fe5fca71
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "031-1.ent">
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml.ref
new file mode 100644
index 0000000000..72ab9d974f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/not-sa/031.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="031-1.ent")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml
new file mode 100644
index 0000000000..7fbef49502
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/001.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml
new file mode 100644
index 0000000000..2e3f1d81dd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc ></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/002.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml
new file mode 100644
index 0000000000..c841b81784
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc >
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/003.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml
new file mode 100644
index 0000000000..a9c5756933
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1="v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml.ref
new file mode 100644
index 0000000000..2d7bfdfd73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/004.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml
new file mode 100644
index 0000000000..b069efe727
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1 = "v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml.ref
new file mode 100644
index 0000000000..2d7bfdfd73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/005.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml
new file mode 100644
index 0000000000..39a346342f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1='v1'></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml.ref
new file mode 100644
index 0000000000..2d7bfdfd73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/006.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml
new file mode 100644
index 0000000000..cc3dc53166
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#32;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml.ref
new file mode 100644
index 0000000000..016a577ded
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/007.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch=" ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml
new file mode 100644
index 0000000000..b3370eb1cc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&amp;&lt;&gt;&quot;&apos;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml.ref
new file mode 100644
index 0000000000..2c879a43a9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/008.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="&<>\"'")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml
new file mode 100644
index 0000000000..0fa183eccf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#x20;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml.ref
new file mode 100644
index 0000000000..016a577ded
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/009.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch=" ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml
new file mode 100644
index 0000000000..eb64d18590
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1="v1" ></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml.ref
new file mode 100644
index 0000000000..2d7bfdfd73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/010.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml
new file mode 100644
index 0000000000..4cac44b4e4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED a2 CDATA #IMPLIED>
+]>
+<doc a1="v1" a2="v2"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml.ref
new file mode 100644
index 0000000000..9fc96fdb80
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/011.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="doc", aName="a2", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}, {localName="a2", qName="a2", uri="", type="CDATA", value="v2"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml
new file mode 100644
index 0000000000..6ce2a3eae2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc : CDATA #IMPLIED>
+]>
+<doc :="v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml.ref
new file mode 100644
index 0000000000..00c76deaf9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/012.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName=":", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="", qName=":", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml
new file mode 100644
index 0000000000..2f4aae4e28
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc _.-0123456789 CDATA #IMPLIED>
+]>
+<doc _.-0123456789="v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml.ref
new file mode 100644
index 0000000000..ef2903d87a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/013.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="_.-0123456789", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="_.-0123456789", qName="_.-0123456789", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml
new file mode 100644
index 0000000000..47f1f723e3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc abcdefghijklmnopqrstuvwxyz CDATA #IMPLIED>
+]>
+<doc abcdefghijklmnopqrstuvwxyz="v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml.ref
new file mode 100644
index 0000000000..bbf1ff75e7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/014.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="abcdefghijklmnopqrstuvwxyz", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="abcdefghijklmnopqrstuvwxyz", qName="abcdefghijklmnopqrstuvwxyz", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml
new file mode 100644
index 0000000000..861df8a610
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc ABCDEFGHIJKLMNOPQRSTUVWXYZ CDATA #IMPLIED>
+]>
+<doc ABCDEFGHIJKLMNOPQRSTUVWXYZ="v1"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml.ref
new file mode 100644
index 0000000000..882da5a6fd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/015.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="ABCDEFGHIJKLMNOPQRSTUVWXYZ", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="ABCDEFGHIJKLMNOPQRSTUVWXYZ", qName="ABCDEFGHIJKLMNOPQRSTUVWXYZ", uri="", type="CDATA", value="v1"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml
new file mode 100644
index 0000000000..66b1973c5d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><?pi?></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml.ref
new file mode 100644
index 0000000000..32c60b28a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/016.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ processingInstruction(target="pi", data="")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml
new file mode 100644
index 0000000000..827ba963bf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><?pi some data ? > <??></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml.ref
new file mode 100644
index 0000000000..604d975e15
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/017.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ processingInstruction(target="pi", data="some data ? > <?")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml
new file mode 100644
index 0000000000..4570903fee
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><![CDATA[<foo>]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml.ref
new file mode 100644
index 0000000000..21117d22b4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/018.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="<foo>")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml
new file mode 100644
index 0000000000..3e6b74cbf2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><![CDATA[<&]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml.ref
new file mode 100644
index 0000000000..f95f625b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/019.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="<&")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml
new file mode 100644
index 0000000000..f749551a1b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><![CDATA[<&]>]]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml.ref
new file mode 100644
index 0000000000..ff6ff3683c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/020.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="<&]>]")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml
new file mode 100644
index 0000000000..13dda8c8a5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><!-- a comment --></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml.ref
new file mode 100644
index 0000000000..52bf68a717
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/021.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ comment(ch=" a comment ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml
new file mode 100644
index 0000000000..41d300e950
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><!-- a comment ->--></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml.ref
new file mode 100644
index 0000000000..b299ce71ee
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/022.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ comment(ch=" a comment ->")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml
new file mode 100644
index 0000000000..3837b831ad
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml.ref
new file mode 100644
index 0000000000..b59c216593
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/023.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml
new file mode 100644
index 0000000000..b0655c634c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (foo)>
+<!ELEMENT foo (#PCDATA)>
+<!ENTITY e "&#60;foo></foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml.ref
new file mode 100644
index 0000000000..00f7fce160
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/024.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo></foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml
new file mode 100644
index 0000000000..ed01f36d89
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (foo*)>
+<!ELEMENT foo (#PCDATA)>
+]>
+<doc><foo/><foo></foo></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml.ref
new file mode 100644
index 0000000000..6a7605c082
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/025.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml
new file mode 100644
index 0000000000..1ba033c1a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (foo*)>
+<!ELEMENT foo EMPTY>
+]>
+<doc><foo/><foo></foo></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml.ref
new file mode 100644
index 0000000000..6a7605c082
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/026.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml
new file mode 100644
index 0000000000..ee02439051
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (foo*)>
+<!ELEMENT foo ANY>
+]>
+<doc><foo/><foo></foo></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml.ref
new file mode 100644
index 0000000000..6a7605c082
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/027.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml
new file mode 100644
index 0000000000..3d95747913
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml.ref
new file mode 100644
index 0000000000..dcda37de1e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/028.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml
new file mode 100644
index 0000000000..909f6ff712
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml.ref
new file mode 100644
index 0000000000..dcda37de1e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/029.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml
new file mode 100644
index 0000000000..3a7ddaa716
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml
@@ -0,0 +1,5 @@
+<?xml version = "1.0"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml.ref
new file mode 100644
index 0000000000..dcda37de1e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/030.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml
new file mode 100644
index 0000000000..a58e05867f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml.ref
new file mode 100644
index 0000000000..7d81068e24
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/031.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='UTF-8'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml
new file mode 100644
index 0000000000..be55c8d721
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' standalone='yes'?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml.ref
new file mode 100644
index 0000000000..96d8f1014d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/032.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' standalone='yes'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml
new file mode 100644
index 0000000000..a3f9053868
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding="UTF-8" standalone='yes'?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml.ref
new file mode 100644
index 0000000000..d56d96d584
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/033.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='UTF-8' standalone='yes'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml
new file mode 100644
index 0000000000..7d52f31c0e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc/>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/034.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml
new file mode 100644
index 0000000000..f109a8b782
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc />
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/035.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml
new file mode 100644
index 0000000000..8ab2b3fb16
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
+<?pi data?>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml.ref
new file mode 100644
index 0000000000..db2cbb1e8d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/036.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ processingInstruction(target="pi", data="data")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml
new file mode 100644
index 0000000000..f9b2113940
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
+<!-- comment -->
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml.ref
new file mode 100644
index 0000000000..12d6a77cad
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/037.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+ comment(ch=" comment ")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml
new file mode 100644
index 0000000000..d14f41bfe2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml
@@ -0,0 +1,6 @@
+<!-- comment -->
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml.ref
new file mode 100644
index 0000000000..d24c10b495
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/038.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ comment(ch=" comment ")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml
new file mode 100644
index 0000000000..0897316e46
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml
@@ -0,0 +1,5 @@
+<?pi data?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml.ref
new file mode 100644
index 0000000000..9eb38b42bb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/039.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="pi", data="data")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml
new file mode 100644
index 0000000000..12c419b65b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1="&quot;&lt;&amp;&gt;&apos;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml.ref
new file mode 100644
index 0000000000..81409bdc13
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/040.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="\"<&>'"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml
new file mode 100644
index 0000000000..a59f536277
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+]>
+<doc a1="&#65;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml.ref
new file mode 100644
index 0000000000..13f83dffcf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/041.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="A"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml
new file mode 100644
index 0000000000..5d7c650944
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#00000000000000000000000000000000065;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml.ref
new file mode 100644
index 0000000000..ed02b8c709
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/042.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="A")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml
new file mode 100644
index 0000000000..a8095dfe28
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ATTLIST doc a1 CDATA #IMPLIED>
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc a1="foo
+bar"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml.ref
new file mode 100644
index 0000000000..3f898a182a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/043.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="foo\r\nbar"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml
new file mode 100644
index 0000000000..bee1d23e1a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (e*)>
+<!ELEMENT e EMPTY>
+<!ATTLIST e a1 CDATA "v1" a2 CDATA "v2" a3 CDATA #IMPLIED>
+]>
+<doc>
+<e a3="v3"/>
+<e a1="w1"/>
+<e a2="w2" a3="v3"/>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml.ref
new file mode 100644
index 0000000000..daab693b31
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/044.xml.ref
@@ -0,0 +1,20 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="e", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="e", aName="a2", type="", valueDefault="", value="")
+ attributeDecl(eName="e", aName="a3", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a3", qName="a3", uri="", type="CDATA", value="v3"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="w1"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a2", qName="a2", uri="", type="CDATA", value="w2"}, {localName="a3", qName="a3", uri="", type="CDATA", value="v3"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml
new file mode 100644
index 0000000000..e2567f532d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
+<!ATTLIST doc a1 CDATA "z1">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml.ref
new file mode 100644
index 0000000000..566221ae0d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/045.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml
new file mode 100644
index 0000000000..c50a2846f9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
+<!ATTLIST doc a2 CDATA "v2">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml.ref
new file mode 100644
index 0000000000..7b1a28d90c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/046.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="doc", aName="a2", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml
new file mode 100644
index 0000000000..a4c688cf1a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>X
+Y</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml.ref
new file mode 100644
index 0000000000..3af5bf2d74
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/047.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="X\r\nY")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml
new file mode 100644
index 0000000000..c6b2dedbba
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>]</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml.ref
new file mode 100644
index 0000000000..0e8482350f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/048.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="]")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml
new file mode 100644
index 0000000000..c3cc797b59
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml.ref
new file mode 100644
index 0000000000..72897d1943
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/049.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="£")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml
new file mode 100644
index 0000000000..12303b1af2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml.ref
new file mode 100644
index 0000000000..8f39355258
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/050.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="เจมส์")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml
new file mode 100644
index 0000000000..7ae8f6c73a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml.ref
new file mode 100644
index 0000000000..71a89a922c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/051.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="เจมส์", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="เจมส์", qName="เจมส์", atts=[])
+ endElement(namespaceURI="", localName="เจมส์", qName="เจมส์")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml
new file mode 100644
index 0000000000..3f33a4c760
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>𐀀􏿽</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml.ref
new file mode 100644
index 0000000000..0b806c96a8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/052.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="𐀀􏿽")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml
new file mode 100644
index 0000000000..0d88f28718
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e "<e/>">
+<!ELEMENT doc (e)>
+<!ELEMENT e EMPTY>
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml.ref
new file mode 100644
index 0000000000..2aa90a79d0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/053.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<e/>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="e", qName="e", atts=[])
+ endElement(namespaceURI="", localName="e", qName="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml
new file mode 100644
index 0000000000..5d1c88b946
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+
+
+<doc
+></doc
+>
+
+
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/054.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml
new file mode 100644
index 0000000000..da0292c5bc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<?pi data?>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml.ref
new file mode 100644
index 0000000000..dc3312be38
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/055.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ processingInstruction(target="pi", data="data")
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml
new file mode 100644
index 0000000000..144871b2a3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#x0000000000000000000000000000000000000041;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml.ref
new file mode 100644
index 0000000000..ed02b8c709
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/056.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="A")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml
new file mode 100644
index 0000000000..c1ac849ed1
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a*)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/057.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml
new file mode 100644
index 0000000000..2ff23b233f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ATTLIST doc a1 NMTOKENS #IMPLIED>
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc a1=" 1 2 "></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml.ref
new file mode 100644
index 0000000000..0acf5f4acd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/058.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value=" 1 \t2 \t"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml
new file mode 100644
index 0000000000..2171480ecf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (e*)>
+<!ELEMENT e EMPTY>
+<!ATTLIST e a1 CDATA #IMPLIED a2 CDATA #IMPLIED a3 CDATA #IMPLIED>
+]>
+<doc>
+<e a1="v1" a2="v2" a3="v3"/>
+<e a1="w1" a2="v2"/>
+<e a1="v1" a2="w2" a3="v3"/>
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml.ref
new file mode 100644
index 0000000000..8a73895f0d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/059.xml.ref
@@ -0,0 +1,20 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="e", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="e", aName="a2", type="", valueDefault="", value="")
+ attributeDecl(eName="e", aName="a3", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}, {localName="a2", qName="a2", uri="", type="CDATA", value="v2"}, {localName="a3", qName="a3", uri="", type="CDATA", value="v3"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="w1"}, {localName="a2", qName="a2", uri="", type="CDATA", value="v2"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="e", qName="e", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="v1"}, {localName="a2", qName="a2", uri="", type="CDATA", value="w2"}, {localName="a3", qName="a3", uri="", type="CDATA", value="v3"}])
+ endElement(namespaceURI="", localName="e", qName="e")
+ characters(ch="\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml
new file mode 100644
index 0000000000..6cd6b4386b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>X&#10;Y</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml.ref
new file mode 100644
index 0000000000..ea1cbd40c0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/060.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="X\nY")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml
new file mode 100644
index 0000000000..bbdc152492
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#163;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml.ref
new file mode 100644
index 0000000000..72897d1943
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/061.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="£")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml
new file mode 100644
index 0000000000..f4ba53090a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#xe40;&#xe08;&#xe21;ส์</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml.ref
new file mode 100644
index 0000000000..8f39355258
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/062.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="เจมส์")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml
new file mode 100644
index 0000000000..9668f2da73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE เจมส์ [
+<!ELEMENT เจมส์ (#PCDATA)>
+]>
+<เจมส์></เจมส์>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml.ref
new file mode 100644
index 0000000000..71a89a922c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/063.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="เจมส์", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="เจมส์", qName="เจมส์", atts=[])
+ endElement(namespaceURI="", localName="เจมส์", qName="เจมส์")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml
new file mode 100644
index 0000000000..74a97aa431
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#x10000;&#x10FFFD;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml.ref
new file mode 100644
index 0000000000..579aeb52f6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/064.xml.ref
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml
new file mode 100644
index 0000000000..f708f2bc17
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#60;">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml.ref
new file mode 100644
index 0000000000..ba31414499
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/065.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml
new file mode 100644
index 0000000000..a27340b9a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA #IMPLIED>
+<!-- 34 is double quote -->
+<!ENTITY e1 "&#34;">
+]>
+<doc a1="&e1;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml.ref
new file mode 100644
index 0000000000..d650af13d3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/066.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ comment(ch=" 34 is double quote ")
+ internatlEntityDecl(name="e1", value="\"")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="\""}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml
new file mode 100644
index 0000000000..a0ccf772a5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#13;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml.ref
new file mode 100644
index 0000000000..9a2358d700
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/067.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml
new file mode 100644
index 0000000000..8ed806b9a3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "&#13;">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml.ref
new file mode 100644
index 0000000000..8ebf150e48
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/068.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="\r")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml
new file mode 100644
index 0000000000..2437f60530
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!NOTATION n PUBLIC "whatever">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml.ref
new file mode 100644
index 0000000000..c5685c6d7a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/069.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="n", publicId="whatever", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml
new file mode 100644
index 0000000000..eef097df76
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e "<!ELEMENT doc (#PCDATA)>">
+%e;
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml.ref
new file mode 100644
index 0000000000..2525ef6ae3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/070.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="<!ELEMENT doc (#PCDATA)>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml
new file mode 100644
index 0000000000..ebfba230a4
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a ID #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/071.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml
new file mode 100644
index 0000000000..6ef39dc49e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a IDREF #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/072.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml
new file mode 100644
index 0000000000..217476d9a9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a IDREFS #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/073.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml
new file mode 100644
index 0000000000..8b2354ff73
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a ENTITY #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/074.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml
new file mode 100644
index 0000000000..33c012441a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a ENTITIES #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/075.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml
new file mode 100644
index 0000000000..65b731cf6d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a NOTATION (n1|n2) #IMPLIED>
+<!NOTATION n1 SYSTEM "http://www.w3.org/">
+<!NOTATION n2 SYSTEM "http://www.w3.org/">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml.ref
new file mode 100644
index 0000000000..3145f641b2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/076.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ notationDecl(name="n1", publicId="", systemId="http://www.w3.org/")
+ notationDecl(name="n2", publicId="", systemId="http://www.w3.org/")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml
new file mode 100644
index 0000000000..e5f301eac8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a (1|2) #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/077.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml
new file mode 100644
index 0000000000..b31f40f94e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #REQUIRED>
+]>
+<doc a="v"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml.ref
new file mode 100644
index 0000000000..6b4e3c4f31
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/078.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="v"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml
new file mode 100644
index 0000000000..a3290d6cbb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #FIXED "v">
+]>
+<doc a="v"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml.ref
new file mode 100644
index 0000000000..6b4e3c4f31
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/079.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="v"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml
new file mode 100644
index 0000000000..3208fa9aa5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #FIXED "v">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml.ref
new file mode 100644
index 0000000000..0b8e512b33
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/080.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml
new file mode 100644
index 0000000000..51ee1a375c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a, b, c)>
+<!ELEMENT a (a?)>
+<!ELEMENT b (b*)>
+<!ELEMENT c (a | b)+>
+]>
+<doc><a/><b/><c><a/></c></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml.ref
new file mode 100644
index 0000000000..1bc73000f8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/081.xml.ref
@@ -0,0 +1,15 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ startElement(namespaceURI="", localName="b", qName="b", atts=[])
+ endElement(namespaceURI="", localName="b", qName="b")
+ startElement(namespaceURI="", localName="c", qName="c", atts=[])
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ endElement(namespaceURI="", localName="c", qName="c")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml
new file mode 100644
index 0000000000..d5245ac51a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e SYSTEM "e.dtd">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml.ref
new file mode 100644
index 0000000000..a333feb826
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/082.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="", systemId="e.dtd")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml
new file mode 100644
index 0000000000..937cfc0bdd
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY % e PUBLIC 'whatever' "e.dtd">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml.ref
new file mode 100644
index 0000000000..d52b5aa8b9
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/083.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="whatever", systemId="e.dtd")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml
new file mode 100644
index 0000000000..82760767aa
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml
@@ -0,0 +1 @@
+<!DOCTYPE doc [<!ELEMENT doc (#PCDATA)>]><doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml.ref
new file mode 100644
index 0000000000..37b53fc0b3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/084.xml.ref
@@ -0,0 +1,7 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml
new file mode 100644
index 0000000000..cf5834f2a5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e "<foo>">
+<!ENTITY e "">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml.ref
new file mode 100644
index 0000000000..8f9cdcc6d0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/085.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="<foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ skippedEntity(name="e")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml
new file mode 100644
index 0000000000..bbc3080db6
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "">
+<!ENTITY e "<foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml.ref
new file mode 100644
index 0000000000..b59c216593
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/086.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml
new file mode 100644
index 0000000000..34797a67d7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY e "<foo/&#62;">
+<!ELEMENT doc (foo)>
+<!ELEMENT foo EMPTY>
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml.ref
new file mode 100644
index 0000000000..33d23092ef
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/087.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<foo/>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="foo", qName="foo", atts=[])
+ endElement(namespaceURI="", localName="foo", qName="foo")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml
new file mode 100644
index 0000000000..f97d96848d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "&lt;foo>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml.ref
new file mode 100644
index 0000000000..db24f3408f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/088.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="&lt;foo>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="<foo>")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml
new file mode 100644
index 0000000000..2d80c8f3fb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#x10000;&#x10FFFD;&#x10FFFF;">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.bak b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.bak
new file mode 100644
index 0000000000..2d80c8f3fb
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.bak
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e "&#x10000;&#x10FFFD;&#x10FFFF;">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.ref
new file mode 100644
index 0000000000..7c68c32286
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/089.xml.ref
Binary files differ
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml
new file mode 100644
index 0000000000..c392c96084
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ATTLIST e a NOTATION (n) #IMPLIED>
+<!ELEMENT doc (e)*>
+<!ELEMENT e (#PCDATA)>
+<!NOTATION n PUBLIC "whatever">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml.ref
new file mode 100644
index 0000000000..1cc0f1e082
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/090.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="e", aName="a", type="", valueDefault="", value="")
+ notationDecl(name="n", publicId="whatever", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml
new file mode 100644
index 0000000000..7343d0f795
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!NOTATION n SYSTEM "http://www.w3.org/">
+<!ENTITY e SYSTEM "http://www.w3.org/" NDATA n>
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a ENTITY "e">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml.ref
new file mode 100644
index 0000000000..da92a9d906
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/091.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ notationDecl(name="n", publicId="", systemId="http://www.w3.org/")
+ unparsedEntityDecl(name="e", publicId="", systemId="http://www.w3.org/", notationName="n")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml
new file mode 100644
index 0000000000..627b74ecdf
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a)*>
+<!ELEMENT a EMPTY>
+]>
+<doc>
+<a/>
+ <a/> <a/>
+
+
+</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml.ref
new file mode 100644
index 0000000000..3b9e06dc9e
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/092.xml.ref
@@ -0,0 +1,17 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\r\n ")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\t")
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ characters(ch="\r\n\r\n\r\n")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml
new file mode 100644
index 0000000000..968acb628f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>
+ </doc> \ No newline at end of file
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml.ref
new file mode 100644
index 0000000000..2e8bee6814
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/093.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="\r\n\r\r")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml
new file mode 100644
index 0000000000..5726e7db6f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ENTITY % e "foo">
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "%e;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml.ref
new file mode 100644
index 0000000000..4f42980c0b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/094.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="%e", value="foo")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml
new file mode 100644
index 0000000000..1fe69596da
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ATTLIST doc a1 CDATA #IMPLIED>
+<!ATTLIST doc a1 NMTOKENS #IMPLIED>
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc a1="1 2"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml.ref
new file mode 100644
index 0000000000..567feee5ad
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/095.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a1", qName="a1", uri="", type="CDATA", value="1 2"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml
new file mode 100644
index 0000000000..a6f8f43620
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ATTLIST doc a1 NMTOKENS " 1 2 ">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml.ref
new file mode 100644
index 0000000000..1e3200f48c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/096.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.ent b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.ent
new file mode 100644
index 0000000000..e06554ace2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.ent
@@ -0,0 +1 @@
+<!ATTLIST doc a2 CDATA #IMPLIED>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml
new file mode 100644
index 0000000000..c606afa97f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY % e SYSTEM "097.ent">
+<!ATTLIST doc a1 CDATA "v1">
+%e;
+<!ATTLIST doc a2 CDATA "v2">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml.ref
new file mode 100644
index 0000000000..b211a094ed
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/097.xml.ref
@@ -0,0 +1,12 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="%e", publicId="", systemId="097.ent")
+ attributeDecl(eName="doc", aName="a1", type="", valueDefault="", value="")
+ resolveEntity(publicId="", systemId="097.ent", ret={})
+ skippedEntity(name="%e")
+ attributeDecl(eName="doc", aName="a2", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml
new file mode 100644
index 0000000000..33a64ce5ae
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><?pi x
+y?></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml.ref
new file mode 100644
index 0000000000..5108be0763
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/098.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ processingInstruction(target="pi", data="x\r\ny")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml
new file mode 100644
index 0000000000..1b7214a137
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml.ref
new file mode 100644
index 0000000000..21cd9bced2
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/099.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ processingInstruction(target="xml", data="version='1.0' encoding='utf-8'")
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml
new file mode 100644
index 0000000000..5b839e76bc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ENTITY e PUBLIC ";!*#@$_%" "100.xml">
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml.ref
new file mode 100644
index 0000000000..aaeec27038
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/100.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ externalEntityDecl(name="e", publicId=";!*#@$_%", systemId="100.xml")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml
new file mode 100644
index 0000000000..f464484bf5
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "&#34;">
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml.ref
new file mode 100644
index 0000000000..5b7646c82f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/101.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="\"")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml
new file mode 100644
index 0000000000..f239ff5fee
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="&#34;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml.ref
new file mode 100644
index 0000000000..75b25052de
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/102.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="\""}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml
new file mode 100644
index 0000000000..1dbbd5bb7c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>&#60;doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml.ref
new file mode 100644
index 0000000000..63526243dc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/103.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="<doc>")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml
new file mode 100644
index 0000000000..666f43de0f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml.ref
new file mode 100644
index 0000000000..2bccd0e3c7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/104.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\ty"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml
new file mode 100644
index 0000000000..6b3af2b847
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x&#9;y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml.ref
new file mode 100644
index 0000000000..2bccd0e3c7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/105.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\ty"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml
new file mode 100644
index 0000000000..8757c0a5ae
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x&#10;y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml.ref
new file mode 100644
index 0000000000..1e9cc0949b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/106.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\ny"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml
new file mode 100644
index 0000000000..3d2c2566a7
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x&#13;y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml.ref
new file mode 100644
index 0000000000..803dbc297b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/107.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\ry"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml
new file mode 100644
index 0000000000..e919bf229a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "
+">
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x&e;y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml.ref
new file mode 100644
index 0000000000..2199bd8fb3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/108.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="\r\n")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\r\ny"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml
new file mode 100644
index 0000000000..33fa38e13b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a=""></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml.ref
new file mode 100644
index 0000000000..789cb33821
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/109.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value=""}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml
new file mode 100644
index 0000000000..0c61c65119
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "&#13;&#10;">
+<!ATTLIST doc a CDATA #IMPLIED>
+]>
+<doc a="x&e;y"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml.ref
new file mode 100644
index 0000000000..2199bd8fb3
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/110.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="\r\n")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value="x\r\ny"}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml
new file mode 100644
index 0000000000..cb56f264b0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a NMTOKENS #IMPLIED>
+]>
+<doc a="&#32;x&#32;&#32;y&#32;"></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml.ref
new file mode 100644
index 0000000000..152e284e58
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/111.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="doc", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[{localName="a", qName="a", uri="", type="CDATA", value=" x y "}])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml
new file mode 100644
index 0000000000..27b6a4c793
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a | b)>
+<!ELEMENT a (#PCDATA)>
+]>
+<doc><a></a></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml.ref
new file mode 100644
index 0000000000..f82c6dca3f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/112.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startElement(namespaceURI="", localName="a", qName="a", atts=[])
+ endElement(namespaceURI="", localName="a", qName="a")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml
new file mode 100644
index 0000000000..d2edd0f01d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST e a CDATA #IMPLIED>
+]>
+<doc></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml.ref
new file mode 100644
index 0000000000..6342ccc536
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/113.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ attributeDecl(eName="e", aName="a", type="", valueDefault="", value="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml
new file mode 100644
index 0000000000..52e207096d
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e "<![CDATA[&foo;]]>">
+]>
+<doc>&e;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml.ref
new file mode 100644
index 0000000000..b11750e4b0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/114.xml.ref
@@ -0,0 +1,11 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e", value="<![CDATA[&foo;]]>")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="&foo;")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml
new file mode 100644
index 0000000000..d939a67010
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY e1 "&e2;">
+<!ENTITY e2 "v">
+]>
+<doc>&e1;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml.ref
new file mode 100644
index 0000000000..5b09ebd425
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/115.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="e1", value="&e2;")
+ internatlEntityDecl(name="e2", value="v")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="v")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml
new file mode 100644
index 0000000000..55ab49620b
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc><![CDATA[
+]]></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml.ref
new file mode 100644
index 0000000000..9bdec9e5cc
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/116.xml.ref
@@ -0,0 +1,10 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ startCDATA()
+ characters(ch="\r\n")
+ endCDATA()
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml
new file mode 100644
index 0000000000..e4f02b14c8
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY rsqb "]">
+]>
+<doc>&rsqb;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml.ref
new file mode 100644
index 0000000000..78dd11416a
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/117.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="rsqb", value="]")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="]")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml
new file mode 100644
index 0000000000..fba6c44668
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ENTITY rsqb "]]">
+]>
+<doc>&rsqb;</doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml.ref
new file mode 100644
index 0000000000..c84da55fe0
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/118.xml.ref
@@ -0,0 +1,9 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ internatlEntityDecl(name="rsqb", value="]]")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ characters(ch="]]")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml
new file mode 100644
index 0000000000..876e74730c
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc ANY>
+]>
+<doc><!-- -á --></doc>
diff --git a/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml.ref b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml.ref
new file mode 100644
index 0000000000..d1c643ee03
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/xmldocs/valid/sa/119.xml.ref
@@ -0,0 +1,8 @@
+setDocumentLocator(locator={columnNumber=1, lineNumber=1})
+startDocument()
+ startDTD(name="doc", publicId="", systemId="")
+ endDTD()
+ startElement(namespaceURI="", localName="doc", qName="doc", atts=[])
+ comment(ch=" -á ")
+ endElement(namespaceURI="", localName="doc", qName="doc")
+endDocument()