Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ public HtmlTransformer()
/// </summary>
public void Transform(string xmlFile, string htmlFile)
{
_xslTransform.Transform(xmlFile, htmlFile);

// DCS happily serializes characters into character references that are not strictly valid XML,
// for example &#xFFFF;. DCS will load them, but for XSL to load them here we need to pass it
// a reader that we've configured to be tolerant of such references.
using XmlReader xr = XmlReader.Create(xmlFile, new XmlReaderSettings() { CheckCharacters = false });
using XmlWriter xw = XmlWriter.Create(htmlFile, new XmlWriterSettings() { CheckCharacters = false });

_xslTransform.Transform(xr, xw);
}
}