Open epatrick opened 2 years ago
Tagging subscribers to this area: @dotnet/area-system-xml See info in area-owners.md if you want to be subscribed.
Author: | epatrick |
---|---|
Assignees: | - |
Labels: | `area-System.Xml`, `untriaged` |
Milestone: | - |
@kronic I think this case is different; it's really about the XmlWriter
rather than the XslCompiledTransform
. The transform is quick, but the results are being written to the HttpResponse
. My goal is to avoiding having to re-enable SyncIO in the ASP.NET core
pipeline.
@epatrick assuming this is a small change would you be interested in sending a patch? We currently don't have cycles to actively look into non-regression bugs in XML. If it's a larger change it would be nice to get some initial idea on how much and types of changes are required to get us to this scenario to work
I've found this when trying to add async to DataverseClient: https://github.com/Data8/DataverseClient/pull/36#issuecomment-1701021824
Any plans to add those missing methods?
In my case WriteEndDocumentAsync
and FlushAsync
Description
When pairing an XSLT with an
XmlWriter
usingXmlWriterSettings.Async = true
, async operations throw aNotImplementedException
. Details founds in this SO post, with this fiddle.This looks unintentional, just an edge case not covered?
The use case is leveraging XSLT in an ASP.NET core pipeline using the recommend async IO.
Reproduction Steps
Expected behavior
XmlWriter.Write*Async methods are supported.
Actual behavior
System.NotImplementedException
is thrown.Regression?
No response
Known Workarounds
Avoid the combination of XmlWriterSettings.OutputMethod = OutputMethod.Html and emitting a doctype of "html".
Working XSLT:
Failing XSLT:
Configuration
.net5.0, .net6 rc2.
Other information
No response