[jira] [Updated] (XERCESJ-841) [Fatal Error] :1:20: XML version "2.0" is not supported, only XML 1.0 is supported.
"Elliotte Rusty Harold (Jira)" <[email protected]> Sun, 19 Jul 2026 12:44:00 +0000 (UTC)
| Newsgroups | gmane.text.xml.xerces-j.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/XERCESJ-841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold updated XERCESJ-841:
------------------------------------------
Description:
My test cases try an XML 1.2 and 2.0 document to make sure they are correctly
reported as malformed (e.g. <?xml version='1.2'?><root/>). Xerces does correctly
report these as malformed. However, when it does so it presents the following
error message on the console:
[Fatal Error] :1:20: XML version "2.0" is not supported, only XML 1.0 is supported.
[Fatal Error] :1:20: XML version "1.2" is not supported, only XML 1.0 is supported.
It shouldn't be printing anything on the console at all. Yes, it should
report the error, but only to the application's ErrorHandler and relevant catch
blocks. Only if the application fails to catch the exception should anything be
printed on the console. Class libraries such as Xerces should not go behind the
application's back to communicate directly with the user.
was:
My test cases try an XML 1.2 and 2.0 document to make sure they are correctly
reported as malformed (e.g. <?xml version='1.2'?><root/>). Xerces does correctly
report these as malformed. However, when it does so it presents the following
error message on the console:
[Fatal Error] :1:20: XML version "2.0" is not supported, only XML 1.0 is supported.
[Fatal Error] :1:20: XML version "1.2" is not supported, only XML 1.0 is supported.
Two problems with this:
1. It should now read "only XML 1.0 and 1.1 are supported"
2. It shouldn't be printing anything on the console at all. Yes, it should
report the error, but only to the application's ErrorHandler and relevant catch
blocks. Only if the application fails to catch the exception should anything be
printed on the console. Class libraries such as Xerces should not go behind the
application's back to communicate directly with the user.
> [Fatal Error] :1:20: XML version "2.0" is not supported, only XML 1.0 is supported.
> -----------------------------------------------------------------------------------
>
> Key: XERCESJ-841
> URL: https://issues.apache.org/jira/browse/XERCESJ-841
> Project: Xerces2-J
> Issue Type: Bug
> Components: SAX
> Affects Versions: 2.5.0
> Environment: Operating System: All
> Platform: All
> Reporter: elharo
>
> My test cases try an XML 1.2 and 2.0 document to make sure they are correctly
> reported as malformed (e.g. <?xml version='1.2'?><root/>). Xerces does correctly
> report these as malformed. However, when it does so it presents the following
> error message on the console:
> [Fatal Error] :1:20: XML version "2.0" is not supported, only XML 1.0 is supported.
> [Fatal Error] :1:20: XML version "1.2" is not supported, only XML 1.0 is supported.
> It shouldn't be printing anything on the console at all. Yes, it should
> report the error, but only to the application's ErrorHandler and relevant catch
> blocks. Only if the application fails to catch the exception should anything be
> printed on the console. Class libraries such as Xerces should not go behind the
> application's back to communicate directly with the user.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)