You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/04/08 02:30:38 UTC
DO NOT REPLY [Bug 18789] New: -
VersionNotSupported error raised while parsing an XML1.1 document with an external entity with version=1.0 in its textDecl
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18789>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18789
VersionNotSupported error raised while parsing an XML1.1 document with an external entity with version=1.0 in its textDecl
Summary: VersionNotSupported error raised while parsing an XML1.1
document with an external entity with version=1.0 in its
textDecl
Product: Xerces2-J
Version: 2.4.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Other
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: nddelima@ca.ibm.com
A valid XML1.1 document with version="1.1" in the XMLDecl of the document
entity, having an external entity with an TextDecl having version="1.0" results
in the fatal error when parsed using XercesJ2.4.0... [Fatal Error] :-1:-1: XML
version "1.0" is not supported, only XML 1.0 is supported. Section 4.3.4 of
the XML1.1 CR spec (http://www.w3.org/TR/xml11/#sec4.3.4) leads me to believe
that this is incorrect.
Test case to reproduce the problem...
test.xml
<?xml version='1.1'?>
<!DOCTYPE doc [
<!ELEMENT doc ANY>
<!ENTITY e SYSTEM "test.ent">
]>
<doc>&e;</doc>
test.ent
<?xml version='1.0' encoding='UTF-8'?>
blah
Proposed patch:
Index: XML11DocumentScannerImpl.java
===================================================================
RCS file: /home/cvspublic/xml-
xerces/java/src/org/apache/xerces/impl/XML11DocumentScannerImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XML11DocumentScannerImpl.java
--- XML11DocumentScannerImpl.java 9 Dec 2002 18:51:29 -0000 1.4
+++ XML11DocumentScannerImpl.java 7 Apr 2003 23:13:51 -0000
@@ -708,7 +708,7 @@
} // isValidNameStartChar(int): boolean
protected boolean versionSupported(String version) {
- return version.equals("1.1");
+ return (version.equals("1.1") || version.equals("1.0"));
} // versionSupported(String): boolean
} // class XML11DocumentScannerImpl
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org