private XmlElement BuildMetadataSection() { XmlElement metadataSection = xmlDocument.CreateXmlElement("metadata", new Dictionary <string, string> { { "xmlns:opf", Resources.MetadataXmlnsOpf }, { "xmlns:dc", Resources.MetadataXmlnsDc } }); metadataSection.NamespaceUri = Resources.MetadataXmlnsDc; metadataSection.AttributesNamespaceUri = Resources.MetadataXmlnsOpf; metadataSection.AppendTextElement("dc:title", Title); metadataSection.AppendTextElement("dc:creator", Creator, new Dictionary <string, string> { { "opf:role", Resources.OpfRole }, { "opf:file-as", Creator } }); metadataSection.AppendTextElement("dc:publisher", Publisher); metadataSection.AppendTextElement("dc:date", Date, new Dictionary <string, string> { { "opf:event", Resources.OpfEvent } }); metadataSection.AppendTextElement("dc:subject", Subject); metadataSection.AppendTextElement("dc:source", Source); metadataSection.AppendTextElement("dc:rights", Rights); metadataSection.AttributesNamespaceUri = null; metadataSection.AppendTextElement("dc:identifier", string.Concat(Resources.IdentifierPrefix, bookGuid), new Dictionary <string, string> { { "id", Resources.OpfIdentifierField } }); metadataSection.AppendTextElement("dc:language", Language); metadataSection.AppendTextElement("dc:description", Description); return(metadataSection); }
private XmlElement BuildDocTitleSection() { XmlElement docTitleSection = xmlDocument.CreateXmlElement("docTitle"); docTitleSection.AppendTextElement("text", BookTitle); return(docTitleSection); }