Hi there,

        It seems one constructor for XmlTextReader really requires a
XmlResolver parameter [ perhaps instead of the dummy boolean ? ], such
that we can resolve URIs correctly in the GetStreamFromUrl call inside
the impl.

        This was provoked by OdfConverter - which likes to stuff a whole load
of XSLT magic inside the .exe itself :-)

        HTH,

                Michael.

-- 
 [EMAIL PROTECTED]  <><, Pseudo Engineer, itinerant idiot

Index: class/System.XML/System.Xml/ChangeLog
===================================================================
--- class/System.XML/System.Xml/ChangeLog	(revision 67310)
+++ class/System.XML/System.Xml/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-11-13  Michael Meeks  <[EMAIL PROTECTED]>
+
+	* XmlReader.cs, XmlTextReader.cs, XmlTextReader2.cs:
+	pass the XmlResolver through to the GetStream impl.
+
 2006-10-30  Atsushi Enomoto <[EMAIL PROTECTED]>
 
 	* XmlTextReader2.cs : if DTD does not exist, do not try to resolve
Index: class/System.XML/System.Xml/XmlReader.cs
===================================================================
--- class/System.XML/System.Xml/XmlReader.cs	(revision 67310)
+++ class/System.XML/System.Xml/XmlReader.cs	(working copy)
@@ -310,7 +310,7 @@
 			settings = PopulateSettings (settings);
 			if (context == null)
 				context = PopulateParserContext (settings, url);
-			XmlTextReader xtr = new XmlTextReader (true, url, GetNodeType (settings), context);
+			XmlTextReader xtr = new XmlTextReader (false, settings.XmlResolver, url, GetNodeType (settings), context);
 			XmlReader ret = CreateCustomizedTextReader (xtr, settings);
 			xtr.CloseInput = true;
 			return xtr;
Index: class/System.XML/System.Xml/XmlTextReader.cs
===================================================================
--- class/System.XML/System.Xml/XmlTextReader.cs	(revision 67310)
+++ class/System.XML/System.Xml/XmlTextReader.cs	(working copy)
@@ -127,8 +127,9 @@
 
 		// This is used in XmlReader.Create() to indicate that string
 		// argument is uri, not an xml fragment.
-		internal XmlTextReader (bool dummy, string url, XmlNodeType fragType, XmlParserContext context)
+		internal XmlTextReader (bool dummy, XmlResolver resolver, string url, XmlNodeType fragType, XmlParserContext context)
 		{
+			this.XmlResolver = resolver;
 			string uriString;
 			Stream stream = GetStreamFromUrl (url, out uriString);
 			this.InitializeContext (uriString, context, new XmlStreamReader (stream), fragType);
Index: class/System.XML/System.Xml/XmlTextReader2.cs
===================================================================
--- class/System.XML/System.Xml/XmlTextReader2.cs	(revision 67310)
+++ class/System.XML/System.Xml/XmlTextReader2.cs	(working copy)
@@ -129,9 +129,9 @@
 			source = new XmlTextReaderImpl (baseURI, xmlFragment, fragType, context);
 		}
 
-		internal XmlTextReader (bool dummy, string url, XmlNodeType fragType, XmlParserContext context)
+		internal XmlTextReader (bool dummy, XmlResolver resolver, string url, XmlNodeType fragType, XmlParserContext context)
 		{
-			source = new XmlTextReaderImpl (dummy, url, fragType, context);
+			source = new XmlTextReaderImpl (dummy, resolver, url, fragType, context);
 		}
 
 		private XmlTextReader (XmlTextReaderImpl entityContainer, bool insideAttribute)
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to