bugDotGNU Portable.NET - Bugs: bug #11326, XmlUrlResolver.ResolveUri() works...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11326: XmlUrlResolver.ResolveUri() works incorrectly without a path name or full URI

Submitted by:  Marcus Urban <mathpup>
Submitted on:  Thu 16 Dec 2004 01:22:06 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 16 Dec 2004 02:17:29 AM UTC, comment #1:

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.

Carl-Adam Brengesjo <ptah>
Project Member
Thu 16 Dec 2004 01:22:06 AM UTC, 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".

Marcus Urban <mathpup>

 

Attached Files
file #2226:  xml-read.cs added by mathpup (272B - text/x-csharp - Test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Dec 2004 09:05:10 AM UTCptahStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Sun 19 Dec 2004 01:28:17 AM UTCptahStatusFixed=>None
  Open/ClosedClosed=>Open
Thu 16 Dec 2004 02:17:29 AM UTCptahStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Thu 16 Dec 2004 01:22:06 AM UTCmathpupAttached File-=>Added xml-read.cs, #1977

Back to the top


Powered by Savane 3.1-cleanup1