[Mono-bugs] [Bug 51495][Nor] New - XmlValidatingReader fails to validate XHTML document (because of URL resolving bug ?)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Jan 2004 01:25:38 -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 atsushi@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=51495

--- shadow/51495	2004-01-13 01:25:38.000000000 -0500
+++ shadow/51495.tmp.32325	2004-01-13 01:25:38.000000000 -0500
@@ -0,0 +1,134 @@
+Bug#: 51495
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: Gentoo 1.4 R8
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: V1
+URL: 
+Cc: 
+Summary: XmlValidatingReader fails to validate XHTML document (because of URL resolving bug ?)
+
+When attempting to validate an XHTML document (with a DTD) using
+XmlValidatingReader with Mono built from cvs, the following exception is
+thrown :
+
+System.Net.WebException: The remote server returned an error: (404) Not Found.
+in <0x003b0> System.Net.HttpWebRequest:CheckFinalStatus
+(System.Net.WebAsyncResult)
+in <0x00065> (wrapper remoting-invoke-with-check)
+System.Net.HttpWebRequest:CheckFinalStatus (System.Net.WebAsyncResult)
+in <0x001c3> System.Net.HttpWebRequest:EndGetResponse (System.IAsyncResult)
+in <0x00092> System.Net.HttpWebRequest:GetResponse ()
+in <0x00036> System.Net.WebClient:OpenRead (string)
+in <0x00058> (wrapper remoting-invoke-with-check)
+System.Net.WebClient:OpenRead (string)
+in <0x001bf> System.Xml.XmlUrlResolver:GetEntity
+(System.Uri,string,System.Type)in <0x00110>
+Mono.Xml.Native.XmlInputStream:.ctor
+(string,bool,System.Xml.XmlResolver,string)
+in <0x0008f> (wrapper remoting-invoke-with-check)
+Mono.Xml.Native.XmlInputStream:.ctor
+(string,bool,System.Xml.XmlResolver,string)
+in <0x00036> Mono.Xml.Native.XmlStreamReader:.ctor
+(string,bool,System.Xml.XmlResolver,string)
+in <0x0008f> (wrapper remoting-invoke-with-check)
+Mono.Xml.Native.XmlStreamReader:.ctor
+(string,bool,System.Xml.XmlResolver,string)
+in <0x00153> Mono.Xml.DTDParameterEntityDeclaration:Resolve
+(System.Xml.XmlResolver)
+in <0x001c7> System.Xml.DTDReader:ReadParameterEntityDecl ()
+in <0x00239> System.Xml.DTDReader:CompileDeclaration ()
+in <0x0029f> System.Xml.DTDReader:ProcessDTDSubset ()
+in <0x00182> System.Xml.DTDReader:ProcessDTDSubset ()
+in <0x0030d> System.Xml.DTDReader:GenerateDTDObjectModel ()
+in <0x001ec> System.Xml.XmlTextReader:GenerateDTDObjectModel
+(string,string,string,string,int,int)
+in <0x0033a> System.Xml.XmlTextReader:ReadDoctypeDecl ()
+in <0x000bf> System.Xml.XmlTextReader:ReadDeclaration ()
+in <0x0008e> System.Xml.XmlTextReader:ReadTag ()
+in <0x000e5> System.Xml.XmlTextReader:ReadContent ()
+in <0x001a0> System.Xml.XmlTextReader:Read ()
+in <0x00409> Mono.Xml.DTDValidatingReader:ReadContent ()
+in <0x017fc> Mono.Xml.DTDValidatingReader:ReadContent ()
+in <0x000b3> Mono.Xml.DTDValidatingReader:Read ()
+in <0x0025d> System.Xml.XmlValidatingReader:Read ()
+in <0x000c0> XHTMLValidate.XHtmlValidateTest:Main ()
+
+Note, this bug also exists in .NET 1.0 and 1.1, but is apparently fixed in
+.NET 1.2/2.0.
+
+I attached a repro for this issue.
+
+------- Additional Comments From gert.driesen@pandora.be  2003-11-29 11:26 -------
+Created an attachment (id=6040)
+test app
+
+
+------- Additional Comments From gert.driesen@pandora.be  2003-11-29 11:27 -------
+Created an attachment (id=6041)
+XHTML 1.1 document to validate
+
+
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-11-29 12:07 -------
+I don't know the actual reason, but here is the result I received 
+from MS.NET 1.1:
+
+System.Net.WebException: The remote server returned an error: (404) 
+Not Found.
+   at System.Net.HttpWebRequest.CheckFinalStatus()
+   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult 
+asyncResult)
+   at System.Net.HttpWebRequest.GetResponse()
+   at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, 
+ICredentials credentials)
+   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials 
+credentials)
+   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String 
+role, Type ofObjectToReturn)
+   at System.Xml.Schema.DtdParser.HandlePERef()
+   at System.Xml.Schema.DtdParser.ParseDtdContent()
+   at System.Xml.Schema.DtdParser.ParseConditionalSect()
+   at System.Xml.Schema.DtdParser.ParseDtdContent()
+   at System.Xml.Schema.DtdParser.ParseConditionalSect()
+   at System.Xml.Schema.DtdParser.ParseDtdContent()
+   at System.Xml.Schema.DtdParser.ParseDocTypeDecl()
+   at System.Xml.Schema.DtdParser.Parse()
+   at System.Xml.XmlTextReader.ParseDtd(XmlScanner scanner)
+   at System.Xml.XmlTextReader.ParseTag()
+   at System.Xml.XmlTextReader.ParseRoot()
+   at System.Xml.XmlTextReader.Read()
+   at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
+   at System.Xml.XmlValidatingReader.Read()
+   at XHTMLValidate.XHtmlValidateTest.Main()
+
+
+------- Additional Comments From gert.driesen@pandora.be  2003-11-29 12:23 -------
+I know this test also fails on .NET 1.1, I also mentioned that in my
+bug report.
+
+Dunno the exact reason either, but it appears that the url for one of
+the entities in the XHTML 1.1 DTD
+(http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd) is not resolved correctly.
+
+It is fixed in .NET 1.2/2.0, does this mean that this will also not be
+fixed in Mono until version 2.0 of Mono ?
+
+
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-11-29 13:14 -------
+oops, sorry I missed that line.
+
+I found that xhtml-notations-1.mod is referenced from 
+http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-framework-1.mod ,
+which is placed on different directory. So it is BaseURI and entity 
+related bug.
+
+However, to solve this problem, entity base uri handling has to be 
+wholly rewritten.