[Mono-bugs] [Bug 81382][Nor] New - file: url unable to handle relative paths
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Apr 16 01:30:43 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by lchin at erggroup.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81382
--- shadow/81382 2007-04-16 01:30:43.000000000 -0400
+++ shadow/81382.tmp.15688 2007-04-16 01:30:43.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 81382
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com
+ReportedBy: lchin at erggroup.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: file: url unable to handle relative paths
+
+Description of Problem:
+As per the summary. Putting relative paths in a file: url fails under mono,
+but works under .NET.
+
+The bug occurs when validating an xml file using XmlValidatingReader. If
+the xml file contains a 'file://' url as its DTD locator, mono will be
+unable to locate the DTD file and fails the validation. .NET succeeds when
+given the same inputs.
+
+Steps to reproduce the problem:
+1. XML FILE:
+
+<!DOCTYPE testfile SYSTEM "file:./testdtd.dtd">
+
+2. C# Validator:
+
+try {
+ XmlTextReader xmltr = new XmlTextReader("xmltest.xml");
+ XmlValidatingReader xmlvr = new XmlValidatingReader(xmltr);
+ xmlvr.ValidationType = ValidationType.DTD;
+ // parse all nodes
+ while (xmlvr.Read());
+} catch (XmlSchemaException ex) {
+ Console.WriteLine("Error: {0}", ex.Message);
+}
+// no exceptions, so must be valid
+Console.WriteLine("Validated file");
+
+Actual Results:
+
+System.UriFormatException: Invalid URI: The hostname could not be parsed.
+ at System.Uri.Parse (System.String uriString) [0x00000]
+ at System.Uri.ParseUri () [0x00000]
+ at System.Uri.Parse () [0x00000]
+
+...
+
+
+Expected Results:
+
+Works on .NET -> "Validated file"
+
+How often does this happen?
+100%
More information about the mono-bugs
mailing list