Example #1
0
        public static void ApplyMigration(VersionedElementInfo migrationInfo, XmlReader input, Stream output)
        {
            var xslt = CreateXslt();

            using var writer = Utilities.BattleScribeConformantXmlWriter.Create(output, new XmlWriterSettings { CloseOutput = false });
            xslt.Transform(input, writer);

            XslCompiledTransform CreateXslt()
            {
                using var migrationXlsStream = migrationInfo.OpenMigrationXslStream();
                using var stylesheetReader   = XmlReader.Create(migrationXlsStream, new XmlReaderSettings { CloseInput = false });
                var transform = new XslCompiledTransform();

                transform.Load(stylesheetReader);
                return(transform);
            }
        }
Example #2
0
 public void Per_element_xsl_migration_is_available(VersionedElementInfo elementInfo)
 {
     using var migrationXslStream = elementInfo.OpenMigrationXslStream();
     migrationXslStream.Should().NotBeNull();
 }