Project

Profile

Help

Bug #2283

s9api s9api transformation pipeline not working under .NET

Added by O'Neil Delpratt over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
Start date:
2015-01-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:

Description

The nunit test TestPipeline does not give any output under .NET.

See the code snippet below. no output reported.

                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");

History

#1 Updated by O'Neil Delpratt over 6 years ago

  • Description updated (diff)

#2 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from New to Resolved

Bug fixed and committed to subversion. The Close method was needed to be subclassed in the XsltTransformer class in the case where this transformer is used as a destination in a pipeline.

#3 Updated by O'Neil Delpratt over 6 years ago

  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.4

Bug fix applied in the Saxon 9.6.0.4 maintenance release.

#4 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed

#5 Updated by O'Neil Delpratt over 5 years ago

  • Sprint/Milestone set to 9.6.0.4
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.4 added

#6 Updated by O'Neil Delpratt over 5 years ago

  • Sprint/Milestone changed from 9.6.0.4 to 9.6.0.3
  • Fixed in Maintenance Release 9.6.0.3 added
  • Fixed in Maintenance Release deleted (9.6.0.4)

#7 Updated by O'Neil Delpratt over 5 years ago

  • Sprint/Milestone changed from 9.6.0.3 to 9.6.0.4
  • Fixed in Maintenance Release 9.6.0.4 added
  • Fixed in Maintenance Release deleted (9.6.0.3)

Please register to edit this issue

Also available in: Atom PDF