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 2001/09/29 01:12:43 UTC
DO NOT REPLY [Bug 3880] New: -
Error: DTD file not found if XML file name contains character such as "%"
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=3880>.
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=3880
Error: DTD file not found if XML file name contains character such as "%"
Summary: Error: DTD file not found if XML file name contains
character such as "%"
Product: Xerces2-J
Version: 2.0.0 [beta 2]
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: yhuang@informatica.com
CC: yhuang@informatica.com
We are using SAX parser in our new project.
An XML file, given a normal file name, such as "test.xml", is working fine
towards SAX parser. But after changing the file name to "tes%t.xml", throws
error:
org.xml.sax.SAXParseException: File "test.dtd" not found.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:975)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern
alEntity(DefaultEntityHandler.java:755)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern
alSubset(DefaultEntityHandler.java:566)
at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScann
er.java:1131)
at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDoc
umentScanner.java:2177)
at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentSc
anner.java:2133)
at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispa
tch(XMLDocumentScanner.java:882)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
Tried Xerces 1.3.1, 1.4.3 and Xerces 2.0.0 (beta 2), get the same error.
The following char.s in the file name will get the same exception:
{, }, [, ], ^, `
Here is the first two lines of the XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE INF_TEST_METADATA SYSTEM "test.dtd">
If no DTD is defined in the XML and if I disable the validation against DTD
option for the parser (
((XMLReader)parser).setFeature("http://xml.org/sax/features/validation", false);
) no exception will occur.
Thanks,
Yinghua
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org