summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib.go b/lib.go
index 865ee29..8e63da9 100644
--- a/lib.go
+++ b/lib.go
@@ -183,3 +183,19 @@ func parseFormatSet(formatSet string) []byte {
}
return []byte("{}")
}
+
+// namespaceStrictToTransitional provides a method to convert Strict and
+// Transitional namespaces.
+func namespaceStrictToTransitional(content []byte) []byte {
+ var namespaceTranslationDic = map[string]string{
+ StrictSourceRelationship: SourceRelationship,
+ StrictSourceRelationshipChart: SourceRelationshipChart,
+ StrictSourceRelationshipComments: SourceRelationshipComments,
+ StrictSourceRelationshipImage: SourceRelationshipImage,
+ StrictNameSpaceSpreadSheet: NameSpaceSpreadSheet,
+ }
+ for s, n := range namespaceTranslationDic {
+ content = bytes.Replace(content, []byte(s), []byte(n), -1)
+ }
+ return content
+}