Commented: (XERCESJ-1156) MalformedURLException occurs when SYSTEMID valu 2006-04-07 - By Jongjin Choi (JIRA)
[ http://issues.apache.org/jira/browse/XERCESJ-1156?page=comments#action _12373582 ]
Jongjin Choi commented on XERCESJ-1156: ---------------------------------------
To reproduce : Use sax.DocumentTracer sample.
(1) sucess case java sax.DocumentTracer test-good.xml
(2) fail case java sax.DocumentTracer test-bad.xml
The result is :
setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser $LocatorProxy@(protected)) startDocument() startDTD(name="샘플",publicId=null,systemId="샘플.DTD") error: Parse error occurred - no protocol: 샘플.DTD java.net.MalformedURLException: no protocol: 샘플.DTD at java.net.URL.<init>(URL.java:537) at java.net.URL.<init>(URL.java:434) at java.net.URL.<init>(URL.java:383) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at sax.DocumentTracer.main(Unknown Source)
This only difference between sample-good.xml and sample-bad.xml is the value of SYSTEMID. (english and korean)
> MalformedURLException occurs when SYSTEMID value is korean character relative url > ----------------------------------------------------------------------------- ---- > > Key: XERCESJ-1156 > URL: http://issues.apache.org/jira/browse/XERCESJ-1156 > Project: Xerces2-J > Type: Bug
> Versions: 2.6.2, 2.8.0 > Environment: Windows XP (korean edition), JDK 1.4, JDK 5.0, xerces 2.6.0, xerces 2.8.2 > Reporter: Jongjin Choi > Attachments: XERCESJ-1156.jar > > If a xml file has a DOCTYPE and the SYSTEMID of DOCTYPE has a korean character relative url, > MalformedException occurs during parsing. > I guess that the same problem will occur if japanese or chinese character is used in SYSTEMID. > This does not occur in JDK 1.4.2 with its internal crimson parser. > I found that Xerces 2.6.2, Xerces 2.8.0 and JDK 1.5 have this problem. > This is related to XERCESJ-391 which seems to be fixed over Xerces 2.6.2 in my test. > The test case xml/dtd and patch for Xerces 2.6.2 will be uploaded. > The patch is simple. The SYSTEMID value which has non-us-ascii character needs to be escaped. > The escaping logic is from the XMLEntityManager#getUserDir(). > I think that xerces 2.8.0 can be patched in the same way.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@(protected) For additional commands, e-mail: j-dev-help@(protected)
|
|