Malt.Reporting.OpenDocument.OdfNamespaceManager.LoadOpenDocumentNamespaces C# (CSharp) Method

LoadOpenDocumentNamespaces() public method

public LoadOpenDocumentNamespaces ( ) : void
return void
        public void LoadOpenDocumentNamespaces()
        {
            this.AddNamespace ("manifest", ManifestNamespace);
            this.AddNamespace ("text", @"urn:oasis:names:tc:opendocument:xmlns:text:1.0");
            this.AddNamespace ("table", @"urn:oasis:names:tc:opendocument:xmlns:table:1.0");
            this.AddNamespace ("xlink", @"http://www.w3.org/1999/xlink");
            this.AddNamespace ("draw", @"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
        }

Usage Example

示例#1
0
        public static void Compile(OdfTemplate template)
        {
            var xml = new XmlDocument();
            template.ReadMainContentXml(xml);
            var nsmanager = new OdfNamespaceManager(xml.NameTable);
            nsmanager.LoadOpenDocumentNamespaces();

            //第1遍,先处理简单的Tag 替换
            PreprocessElements(xml, nsmanager);

            //第2遍,处理表格循环
            ProcessTableRows(xml, nsmanager);

            template.WriteXmlContent(xml);
        }