-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmlContentTypes.go
More file actions
37 lines (32 loc) · 1.25 KB
/
xmlContentTypes.go
File metadata and controls
37 lines (32 loc) · 1.25 KB
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
// Copyright 2026 kenny-not-dead. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
//
// Package gopptx provides functionality to create and manipulate PowerPoint
// (.pptx) files in Go, using the Office Open XML (ECMA-376) format.
package gopptx
import (
"encoding/xml"
"sync"
)
// contentTypes directly maps the types' element of content types for relationship
// parts, it takes a Multipurpose Internet Mail Extension (MIME) media type as a
// value.
type contentTypes struct {
mu sync.Mutex
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/content-types Types"`
Defaults []contentTypeDefault `xml:"Default"`
Overrides []contentTypeOverride `xml:"Override"`
}
// contentTypeOverride directly maps the override element in the namespace
// http://schemas.openxmlformats.org/package/2006/content-types
type contentTypeOverride struct {
PartName string `xml:",attr"`
ContentType string `xml:",attr"`
}
// contentTypeDefault directly maps the default element in the namespace
// http://schemas.openxmlformats.org/package/2006/content-types
type contentTypeDefault struct {
Extension string `xml:",attr"`
ContentType string `xml:",attr"`
}