/// <summary> /// Write the closing element end tag to the output. /// </summary> /// <param name="sDataType"></param> public void Finish(string sDataType) { if (m_sFormat == "xhtml") { if (m_schCurrent.Length > 0) { m_writer.WriteLine("</div>"); // for letData } m_xhtml.WriteXhtmlEnding(); } else { m_writer.WriteLine("</{0}>", sDataType); } m_writer.Close(); m_strm = null; m_writer = null; }
private void ExportTE() { m_xhtml.WriteXhtmlHeading(m_fileName, m_sDescription, "scrBody"); ExportScripture(); m_xhtml.WriteXhtmlEnding(); m_writer.Close(); string sXsltFile = Path.Combine(DirectoryFinder.GetFWCodeSubDirectory("Translation Editor"), "XhtmlExport.xsl"); string sTempFile1 = m_fileName + "-1"; if (File.Exists(sTempFile1)) { File.Delete(sTempFile1); } File.Move(m_fileName, sTempFile1); XslCompiledTransform xsl = new XslCompiledTransform(); xsl.Load(sXsltFile); xsl.Transform(sTempFile1, m_fileName); //#if DEBUG // string sSave = m_fileName + "-Phase1"; // File.Delete(sSave); // File.Copy(sTempFile1, sSave); //#endif File.Delete(sTempFile1); string sTempFile2 = m_fileName + "-2"; if (File.Exists(sTempFile2)) { File.Delete(sTempFile2); } File.Move(m_fileName, sTempFile2); m_xhtml.FinalizeXhtml(m_fileName, sTempFile2); //#if DEBUG // sSave = m_fileName + "-Phase2"; // File.Delete(sSave); // File.Copy(sTempFile2, sSave); //#endif File.Delete(sTempFile2); m_xhtml.WriteCssFile(Path.ChangeExtension(m_fileName, ".css"), m_styleSheet, XhtmlHelper.CssType.Scripture, m_pub); }