diff options
author | Jakub Wieczorek <faw217@gmail.com> | 2009-10-26 21:23:28 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2009-11-25 09:41:04 (GMT) |
commit | c6eee578665bfd2c3b25b238cf8ae24fee00f9f7 (patch) | |
tree | 65068fe7c4938510a8a807e19202381e64f46354 /tests/auto/qxmlstream | |
parent | 6cb0ac70301a21e914cb5716642c756312b3ec30 (diff) | |
download | Qt-c6eee578665bfd2c3b25b238cf8ae24fee00f9f7.zip Qt-c6eee578665bfd2c3b25b238cf8ae24fee00f9f7.tar.gz Qt-c6eee578665bfd2c3b25b238cf8ae24fee00f9f7.tar.bz2 |
QXmlStream: Fix parsing of DTDs that contain empty markup declarations
like e.g. <!DOCTYPE doc []>
According to the specification, it is possible for a doctype to contain
no markup declarations:
http://www.w3.org/TR/xml/#sec-prolog-dtd
"intSubset ::= (markupdecl | DeclSep)*"
However, currently QXmlStreamReader would raise an error when
encountering such a declaration.
Merge-request: 1926
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Diffstat (limited to 'tests/auto/qxmlstream')
-rw-r--r-- | tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref | 7 | ||||
-rw-r--r-- | tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref new file mode 100644 index 0000000..ea85e32 --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.ref @@ -0,0 +1,7 @@ +StartDocument( ) +Comment( text=" Empty markup declaration in a doctype. " ) +DTD( text=" +<!DOCTYPE doc []>" dtdName="doc" ) +StartElement( name="doc" qualifiedName="doc" ) +EndElement( name="doc" qualifiedName="doc" ) +EndDocument( ) diff --git a/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml new file mode 100644 index 0000000..1c66c0c --- /dev/null +++ b/tests/auto/qxmlstream/data/doctypeEmptyMarkupDecl.xml @@ -0,0 +1,3 @@ +<!-- Empty markup declaration in a doctype. --> +<!DOCTYPE doc []> +<doc></doc> |