[Mono-bugs] [Bug 47691][Nor] New - XPathDocument (and other classes?) have problems when a folder name containing the xmldocument src contains the # character.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 6 Jan 2004 02:01:59 -0500 (EST)

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 ginga@kit.hi-ho.ne.jp.


--- shadow/47691	2004-01-06 02:01:59.000000000 -0500
+++ shadow/47691.tmp.15275	2004-01-06 02:01:59.000000000 -0500
@@ -0,0 +1,111 @@
+Bug#: 47691
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: RESOLVED   
+Resolution: FIXED
+Severity: Unknown
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: chris@turchin.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: XPathDocument (and other classes?) have problems when a folder name containing the xmldocument src contains the # character.
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: XPathDocument (and others?) have problems when a
+folder name containing the xmldocument src contains the # character. 
+Steps to reproduce the problem:
+0. mkdir c#;cd c#
+1. wget http://turchin.net/transform.cs;wget
+http://turchin.net/transform.xml;wget http://turchin.net/transform.xsl
+2. mcs transform.cs
+3. mono transform.exe ./transform.xml ./transform.xsl
+Actual Results:
+Unhandled Exception: System.IO.FileNotFoundException: Could not find file
+in <0x002fa> 00 System.IO.FileStream:.ctor
+in <0x00043> 00 System.IO.FileStream:.ctor
+in <0x000a3> 08 System.IO.FileStream:.ctor
+in <0x0008a> 00 System.Xml.XmlUrlResolver:GetEntity
+in <0x00110> 00 Mono.Xml.Native.XmlInputStream:.ctor
+in <0x000a5> 08 Mono.Xml.Native.XmlInputStream:.ctor
+in <0x00035> 00 Mono.Xml.Native.XmlStreamReader:.ctor
+in <0x00018> 00 Mono.Xml.Native.XmlStreamReader:.ctor
+in <0x0008a> 08 Mono.Xml.Native.XmlStreamReader:.ctor
+in <0x0003a> 00 System.Xml.XmlTextReader:.ctor (string,System.Xml.XmlNameTable)
+in <0x0003b> 00 System.Xml.XmlTextReader:.ctor (string)
+in <0x0002a> 00 System.Xml.XPath.XPathDocument:.ctor (string)
+in <0x0003f> 00 .XmlTransformUtil:Transform (string,string,string)
+in <0x00089> 00 .XmlTransformUtil:Main (string[])
+Expected Results:
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Welcome to northeast region</title>
+<h1>Welcome to northeast region</h1>
+<b>Our contact details:</b><br><br>XYZ Inc.<br>One Abc Way<br>Some
+avenue<br>Tech city<br>Neverland<h2></h2>
+<b>Our contact details:</b><br><br>abc Inc.<br>2 nnn Way<br>the
+avenue<br>xml city<br>de</body>
+How often does this happen? reproducible. workaround:  directory name
+cannot contain # character: 
+1) cd ..;mv c# cs;cd cs;mono transform.exe ./transform.xml ./transform.xsl
+Additional Information: perhaps the problem is in libxml2 although it
+happens with 'export MONO_MANAGED_XSLT=true' as well so i guess not
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-08-18 22:48 -------
+I think it might be XmlUrlResolver bug. I uses new Uri (Uri, string) 
+in that class, and on using new Uri (Uri uri, string relativeUri), 
+relativeUri should contain uri fragment separated by '#'. Let me look 
+at it.
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-08-21 12:10 -------
+As to XmlUrlResolver, I've found the cause of the bug which was 
+reproduced with MS.NET and I've fixed it. But as to Mono's System.Uri 
+class, it still have its own bug related to this problem. Chris gave 
+me the test case for it:
+Uri uri = null;
+uri = new Uri (@"\\myserver\mydir\mysubdir\C#\myfile.ext");
+("#n4711", "/myserver/mydir/mysubdir/C#/myfile.ext", uri.LocalPath);
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-08-21 14:42 -------
+Created an attachment (id=5186)
+A patch candidate to fix that problem.
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2004-01-06 02:01 -------
+This looks fixed in latest Path and Uri fixes. Thanks.