[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #11326] XmlUrlResolver.ResolveUri() works incorr
From: |
Carl-Adam Brengesjo |
Subject: |
[Pnet-developers] [bugs #11326] XmlUrlResolver.ResolveUri() works incorrectly without a path name or full URI |
Date: |
Sun, 19 Dec 2004 02:25:00 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041125 Firefox/1.0 |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #11326] Latest Modifications:
Changes by:
Carl-Adam Brengesjo <address@hidden>
'Date:
Sun 12/19/2004 at 01:28 (Europe/Stockholm)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | Fixed | None
Status | Closed | Open
/**************************************************************************/
[bugs #11326] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11326>
Project: DotGNU Portable.NET
Submitted by: Marcus Urban
On: Thu 12/16/2004 at 01:22
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Summary: XmlUrlResolver.ResolveUri() works incorrectly without a path name or
full URI
Original Submission: This problem is actually more general than it might
appear at first. I first encountered problems when calling
xmlDocument.Load("classQChar.xml"), resulting in the exception
Uncaught exception: System.ArgumentNullException: Argument cannot be null
Parameter name: absoluteUri
at System.Xml.XmlUrlResolver.GetEntity(Uri, String, Type) in
./XmlUrlResolver.cs:49
at System.Xml.XmlTextReader..ctor(String, XmlNameTable) in
./XmlTextReader.cs:302
at System.Xml.XmlTextReader..ctor(String)
at System.Xml.XmlDocument.Load(String) in ./XmlDocument.cs:664
at API.AddAPIFromFile(String)
at ApiGe.Main(String[])
XmlTextReader..ctor(String) calls resolver.ResolveUri(null, string), where
string is the file that was to be loaded. In the case above, "classQChar.xml".
However, ResolveUri() returns null for this string. That seems to be the real
problem. Under MS.NET, it appears that the filename is expanded to its full
path (if it is not of the form whatever://moreStuff).
In the test case attached, MS reports "uri is not null", whereas Pnet reports
"uri is null".
Follow-up Comments
------------------
-------------------------------------------------------
Date: Thu 12/16/2004 at 02:17 By: Carl-Adam Brengesjo <ptah>
Problem is, "classQChar.xml" is not a valid Uri format (it's relative, not
absolute), and so we have to expand it to a absolute Uri format before calling
the Uri ctor.
Fixed in CVS December 16 2004.
File Attachments
-------------------
-------------------------------------------------------
Date: Thu 12/16/2004 at 01:22 Name: xml-read.cs Size: 272B By: mathpup
Test case
http://savannah.gnu.org/bugs/download.php?item_id=11326&item_file_id=1977
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11326>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [bugs #11326] XmlUrlResolver.ResolveUri() works incorrectly without a path name or full URI,
Carl-Adam Brengesjo <=