public void FixtureSetup()
        {
			xslParams = new Dictionary<string, object>();
			DateTime dateTime = new DateTime(2013, 8, 27);
			xslParams.Add("dateTime", dateTime.Date);
			xslParams.Add("user", "Tester");
			xslParams.Add("projName", "TestProj");
			xslParams.Add("stylesheet", "usfm");
			xslParams.Add("ws", "en");
            xslParams.Add("fontName", "Times");
            xslParams.Add("fontSize", "12");

            if (Common.IsUnixOS())
            {
                _htmlHeader = "<head><title></title></head>";
            }

            ParatextPathwayLink converter = new ParatextPathwayLink("testDb", xslParams);
            encloseParasInSections = ParatextSupportExtensions.EncloseParasInSectionsXslt(converter);
        }
 public static XslCompiledTransform EncloseParasInSectionsXslt(ParatextPathwayLink converter)
 {
     return (XslCompiledTransform)ReflectionHelperLite.GetField(converter, "_mEncloseParasInSections");
 }
 public static XslCompiledTransform UsxToUsfmXslt(ParatextPathwayLink converter)
 {
     return (XslCompiledTransform)ReflectionHelperLite.GetField(converter, "_mUsxToXhtml");
 }
Exemple #4
0
        public void FixtureSetup()
        {
            xslParams = new Dictionary<string, object>();
            DateTime dateTime = new DateTime(2013, 8, 27);
            xslParams.Add("dateTime", String.Format("{0:s}", dateTime));
            xslParams.Add("user", "Tester");
            xslParams.Add("projName", "TestProj");
            xslParams.Add("stylesheet", "usfm");
            xslParams.Add("ws", "en");
            xslParams.Add("fontName", "Times");
            xslParams.Add("fontSize", "12");


            Common.ProgInstall = PathPart.Bin(Environment.CurrentDirectory, @"/../../DistFiles");
            Common.SupportFolder = "";
            Common.ProgBase = Common.ProgInstall;
            string testPath = PathPart.Bin(Environment.CurrentDirectory, "/ParatextSupport/TestFiles");
            _inputPath = Common.PathCombine(testPath, "Input");
            _outputPath = Common.PathCombine(testPath, "output");
            _expectedPath = Common.PathCombine(testPath, "Expected");
            if (Directory.Exists(_outputPath))
                Directory.Delete(_outputPath, true);
            Directory.CreateDirectory(_outputPath);

            converter = new ParatextPathwayLink("testDb", xslParams);
            usxToXhtmlXslt = ParatextSupportExtensions.UsxToUsfmXslt(converter);
        }