@@ -31,61 +31,61 @@ type DocProperties struct {
31
31
Version string
32
32
}
33
33
34
+ // decodeDcTerms directly maps the DCMI metadata terms for the coreProperties.
35
+ type decodeDcTerms struct {
36
+ Text string `xml:",chardata"`
37
+ Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
38
+ }
39
+
34
40
// decodeCoreProperties directly maps the root element for a part of this
35
41
// content type shall coreProperties. In order to solve the problem that the
36
42
// label structure is changed after serialization and deserialization, two
37
43
// different structures are defined. decodeCoreProperties just for
38
44
// deserialization.
39
45
type decodeCoreProperties struct {
40
- XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties coreProperties"`
41
- Title string `xml:"http://purl.org/dc/elements/1.1/ title,omitempty"`
42
- Subject string `xml:"http://purl.org/dc/elements/1.1/ subject,omitempty"`
43
- Creator string `xml:"http://purl.org/dc/elements/1.1/ creator"`
44
- Keywords string `xml:"keywords,omitempty"`
45
- Description string `xml:"http://purl.org/dc/elements/1.1/ description,omitempty"`
46
- LastModifiedBy string `xml:"lastModifiedBy"`
47
- Language string `xml:"http://purl.org/dc/elements/1.1/ language,omitempty"`
48
- Identifier string `xml:"http://purl.org/dc/elements/1.1/ identifier,omitempty"`
49
- Revision string `xml:"revision,omitempty"`
50
- Created struct {
51
- Text string `xml:",chardata "`
52
- Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr "`
53
- } `xml:"http://purl.org/dc/terms/ created "`
54
- Modified struct {
55
- Text string `xml:",chardata"`
56
- Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
57
- } `xml:"http://purl.org/dc/ terms/ modified"`
58
- ContentStatus string `xml:"contentStatus,omitempty"`
59
- Category string `xml:"category,omitempty "`
60
- Version string `xml:"version,omitempty "`
46
+ XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties coreProperties"`
47
+ Title string `xml:"http://purl.org/dc/elements/1.1/ title,omitempty"`
48
+ Subject string `xml:"http://purl.org/dc/elements/1.1/ subject,omitempty"`
49
+ Creator string `xml:"http://purl.org/dc/elements/1.1/ creator"`
50
+ Keywords string `xml:"keywords,omitempty"`
51
+ Description string `xml:"http://purl.org/dc/elements/1.1/ description,omitempty"`
52
+ LastModifiedBy string `xml:"lastModifiedBy"`
53
+ Language string `xml:"http://purl.org/dc/elements/1.1/ language,omitempty"`
54
+ Identifier string `xml:"http://purl.org/dc/elements/1.1/ identifier,omitempty"`
55
+ Revision string `xml:"revision,omitempty"`
56
+ Created * decodeDcTerms `xml:"http://purl.org/dc/terms/ created"`
57
+ Modified * decodeDcTerms `xml:"http://purl.org/dc/terms/ modified "`
58
+ ContentStatus string `xml:"contentStatus,omitempty "`
59
+ Category string `xml:"category,omitempty "`
60
+ Version string `xml:"version,omitempty"`
61
+ }
62
+
63
+ // xlsxDcTerms directly maps the DCMI metadata terms for the coreProperties.
64
+ type xlsxDcTerms struct {
65
+ Text string `xml:",chardata "`
66
+ Type string `xml:"xsi:type,attr "`
61
67
}
62
68
63
69
// xlsxCoreProperties directly maps the root element for a part of this
64
70
// content type shall coreProperties.
65
71
type xlsxCoreProperties struct {
66
- XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties coreProperties"`
67
- Dc string `xml:"xmlns:dc,attr"`
68
- Dcterms string `xml:"xmlns:dcterms,attr"`
69
- Dcmitype string `xml:"xmlns:dcmitype,attr"`
70
- XSI string `xml:"xmlns:xsi,attr"`
71
- Title string `xml:"dc:title,omitempty"`
72
- Subject string `xml:"dc:subject,omitempty"`
73
- Creator string `xml:"dc:creator"`
74
- Keywords string `xml:"keywords,omitempty"`
75
- Description string `xml:"dc:description,omitempty"`
76
- LastModifiedBy string `xml:"lastModifiedBy"`
77
- Language string `xml:"dc:language,omitempty"`
78
- Identifier string `xml:"dc:identifier,omitempty"`
79
- Revision string `xml:"revision,omitempty"`
80
- Created struct {
81
- Text string `xml:",chardata"`
82
- Type string `xml:"xsi:type,attr"`
83
- } `xml:"dcterms:created"`
84
- Modified struct {
85
- Text string `xml:",chardata"`
86
- Type string `xml:"xsi:type,attr"`
87
- } `xml:"dcterms:modified"`
88
- ContentStatus string `xml:"contentStatus,omitempty"`
89
- Category string `xml:"category,omitempty"`
90
- Version string `xml:"version,omitempty"`
72
+ XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties coreProperties"`
73
+ Dc string `xml:"xmlns:dc,attr"`
74
+ Dcterms string `xml:"xmlns:dcterms,attr"`
75
+ Dcmitype string `xml:"xmlns:dcmitype,attr"`
76
+ XSI string `xml:"xmlns:xsi,attr"`
77
+ Title string `xml:"dc:title,omitempty"`
78
+ Subject string `xml:"dc:subject,omitempty"`
79
+ Creator string `xml:"dc:creator"`
80
+ Keywords string `xml:"keywords,omitempty"`
81
+ Description string `xml:"dc:description,omitempty"`
82
+ LastModifiedBy string `xml:"lastModifiedBy"`
83
+ Language string `xml:"dc:language,omitempty"`
84
+ Identifier string `xml:"dc:identifier,omitempty"`
85
+ Revision string `xml:"revision,omitempty"`
86
+ Created * xlsxDcTerms `xml:"dcterms:created"`
87
+ Modified * xlsxDcTerms `xml:"dcterms:modified"`
88
+ ContentStatus string `xml:"contentStatus,omitempty"`
89
+ Category string `xml:"category,omitempty"`
90
+ Version string `xml:"version,omitempty"`
91
91
}
0 commit comments