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 2002/04/17 16:22:05 UTC

DO NOT REPLY [Bug 8194] - % char in file name causes exception in parse method

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=8194>.
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=8194

% char in file name causes exception in parse method

gmarcy@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From gmarcy@us.ibm.com  2002-04-17 14:22 -------
While one might like to think of the parameter to parse() as being a file
name, it is not.  It is a system identifier, which is somewhat like a URI.
The XML parser opens resources via URIs, not filenames.  There are some
minor "hacks" to try to recognize things like "C:" and '\' instead of '/',
but those are all things that should not ever be used in XML files and
the code for the document entity system identifier is not any different
in this regard in Xerces.

Therefore, the "file name" must obey the conventions for URIs and that
includes which characters are legal verbatum and which must be escaped.
In particular, in rfc2396, which governs URIs, it says:

  "Because the percent "%" character always has the reserved purpose of
   being the escape indicator, it must be escaped as "%25" in order to
   be used as data within a URI."

So, any system identifier that has a "%" that is not a URI escape sequence
is an "illegal argument".

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org