1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use super::XMLBuilder;
use super::XmlEvent;

impl XMLBuilder {
    pub(crate) fn open_header(mut self) -> Self {
        self.writer
            .write(
                XmlEvent::start_element("w:hdr")
                    .attr(
                        "xmlns:r",
                        "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
                    )
                    .attr("xmlns:o", "urn:schemas-microsoft-com:office:office")
                    .attr("xmlns:v", "urn:schemas-microsoft-com:vml")
                    .attr(
                        "xmlns:w",
                        "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
                    )
                    .attr("xmlns:w10", "urn:schemas-microsoft-com:office:word")
                    .attr(
                        "xmlns:wp",
                        "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
                    )
                    .attr(
                        "xmlns:wps",
                        "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
                    )
                    .attr(
                        "xmlns:wpg",
                        "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
                    )
                    .attr(
                        "xmlns:mc",
                        "http://schemas.openxmlformats.org/markup-compatibility/2006",
                    )
                    .attr(
                        "xmlns:wp14",
                        "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
                    )
                    .attr(
                        "xmlns:w14",
                        "http://schemas.microsoft.com/office/word/2010/wordml",
                    )
                    .attr("mc:Ignorable", "w14 wp14"),
            )
            .expect("should write to buf");
        self
    }
}