Bug #2283
Updated by O'Neil Delpratt over 9 years ago
The nunit test TestPipeline does not give any output gives incorrect result under .NET. See the code snippet below. no output reported. <pre><code class="css"> Processor proc = new Processor(false); XsltCompiler comp = proc.NewXsltCompiler(); StringWriter sw = new StringWriter(); Serializer out1 = new Serializer(); out1.SetOutputWriter(sw); String xsl = "<xsl:stylesheet version='2.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>" + "<xsl:template match='/'><a><xsl:copy-of select='.'/></a></xsl:template>" + "</xsl:stylesheet>"; String xml = "<z/>"; XdmNode in1 = proc.NewDocumentBuilder().Build(new StringReader(xml)); XsltTransformer stage1 = comp.Compile(new StringReader(xsl)).Load(); XsltTransformer stage2 = comp.Compile(new StringReader(xsl)).Load(); XsltTransformer stage3 = comp.Compile(new StringReader(xsl)).Load(); XsltTransformer stage4 = comp.Compile(new StringReader(xsl)).Load(); XsltTransformer stage5 = comp.Compile(new StringReader(xsl)).Load(); //Uncomment when running under Saxon 9.6 and greater stage1.Destination = stage2; stage2.Destination = stage3; stage3.Destination = stage4; stage4.Destination = stage5; stage5.Destination = out1; stage1.InitialContextNode = in1; stage1.Run(stage2); Assert.True(sw.ToString().Contains("<a><a><a><a><a><z/></a></a></a></a></a>"), "output"); </code></pre>