Blogger :
Oleg Tkachenko
All posts :
All posts by Oleg Tkachenko
Category :
.NET XML, System.XML
Blogged date : 2005 Jul 11
I`m porting nxslt utility to .NET 2.0 with XslCompiledTransform as XSLT processor and I just found out XslCompiledTransform API is really severe broken. I was writing before that the only Transform() method overload that accepts XmlResolver outputs to XmlWriter. So if you want to create HTML and to have some control over document() function resolving (or just provide user credentials), you are out of luck with XslCompiledTransform. Quite common scenario, isn`t it Too bad, XML Team should hire better testers.
As Anton Lapounov pointed out XmlWriter is .NET 2.0 is actually capable to write not only XML, but also HTML or text. This behavior is controlled by XmlWriterSettings.OutputMethod property. But this property appears to be read-only (setter is internal). And after all this doesn`t really solve my problem with nxslt utility porting, because in a general purpose XSLT utility XSLT output method should be controlled by a XSLT stylesheet, not by code that run transformation.
Oh well, I filed this issue as a bug. But I`m afraid to get another "postponed". I believe it`s a critical one, so please vote to get it fixed now, not in some future releases! It`s a couple of lines after all - all they need is to introduce two more three-lines-long Transform() methods!