Skip to content

Commit

Permalink
Initialize XmlReaders using StreamReaders (#6863)
Browse files Browse the repository at this point in the history
  • Loading branch information
benvillalobos authored Sep 29, 2021
1 parent 9881f46 commit ceb2a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tasks/XslTransformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public XmlReader CreateReader(int itemPos)
{
if (XmlMode == XmlModes.XmlFile)
{
return XmlReader.Create(_data[itemPos]);
return XmlReader.Create(new StreamReader(_data[itemPos]), null, _data[itemPos]);
}
else // xmlModes.Xml
{
Expand Down Expand Up @@ -459,7 +459,7 @@ public XslCompiledTransform LoadXslt(bool useTrustedSettings)
_log.LogMessageFromResources(MessageImportance.Low, "XslTransform.UseTrustedSettings", _data);
}

xslct.Load(new XPathDocument(XmlReader.Create(_data)), settings, new XmlUrlResolver());
xslct.Load(new XPathDocument(XmlReader.Create(new StreamReader(_data), null, _data)), settings, new XmlUrlResolver());
break;
case XslModes.XsltCompiledDll:
#if FEATURE_COMPILED_XSL
Expand Down

0 comments on commit ceb2a05

Please sign in to comment.