[Mono-bugs] [Bug 392385] New: XMLReader BaseURI not set
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 19 23:06:03 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=392385
Summary: XMLReader BaseURI not set
Product: Mono: Class Libraries
Version: 1.9.0
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: peter.nunn at vistic.net
QAContact: mono-bugs at lists.ximian.com
Found By: Third Party Developer/Partner
The XmlReader method PopulateParserContext (XmlReader.cs:234) has the following
implementation:
private static XmlParserContext PopulateParserContext (
XmlReaderSettings settings, string baseUri)
{
XmlNameTable nt = PopulateNameTable (settings);
return new XmlParserContext (nt,
new XmlNamespaceManager (nt),
baseUri,
XmlSpace.None);
}
Unfortunately this calls the constructor for the XmlParserContext
(XmlParserContext.cs:58) with the following signature:
public XmlParserContext (
XmlNameTable nt,
XmlNamespaceManager nsMgr,
string xmlLang,
XmlSpace xmlSpace) :
this (
nt,
nsMgr,
null,
null,
null,
null,
null,
xmlLang,
xmlSpace,
null
)
{
}
The string being passed in is interpreted as the xmlLang, not the BaseURI. The
constructor that should be called is at line 127:
public XmlParserContext (
XmlNameTable nt,
XmlNamespaceManager nsMgr,
string docTypeName,
string pubId,
string sysId,
string internalSubset,
string baseURI,
string xmlLang,
XmlSpace xmlSpace,
Encoding enc)
A fix for this is to replace the call in the XmlReader file with:
private static XmlParserContext PopulateParserContext (
XmlReaderSettings settings, string baseUri)
{
XmlNameTable nt = PopulateNameTable (settings);
return new XmlParserContext (nt,
new XmlNamespaceManager
(nt),
null,
null,
null,
null,
baseUri,
null,
XmlSpace.None,
null);
}
This resolves the issue.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list