diff options
author | xuri <xuri.me@gmail.com> | 2020-07-18 15:15:16 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-07-18 15:15:16 +0800 |
commit | c922c32fb7571d3d40d3244e5635142bc390a3db (patch) | |
tree | 12c2a1541458963caca5f7714d7861c42637d4c6 /xmlDrawing.go | |
parent | 820a314cfbcaa4d32401b0b6c67bf65f064483ec (diff) |
support parse and generate XML element namespace dynamic, fix #651
Diffstat (limited to 'xmlDrawing.go')
-rw-r--r-- | xmlDrawing.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmlDrawing.go b/xmlDrawing.go index 9c7ef54..24df0fa 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -14,8 +14,14 @@ package excelize import "encoding/xml" // Source relationship and namespace. +var ( + SourceRelationship = xml.Attr{Name: xml.Name{Local: "r", Space: "xmlns"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/relationships"} + NameSpaceSpreadSheet = xml.Attr{Name: xml.Name{Local: "xmlns"}, Value: "http://schemas.openxmlformats.org/spreadsheetml/2006/main"} + NameSpaceSpreadSheetX14 = xml.Attr{Name: xml.Name{Local: "x14", Space: "xmlns"}, Value: "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"} +) + +// Source relationship and namespace. const ( - SourceRelationship = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" SourceRelationshipChart = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" SourceRelationshipComments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" SourceRelationshipImage = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" @@ -37,8 +43,6 @@ const ( NameSpaceDrawingML = "http://schemas.openxmlformats.org/drawingml/2006/main" NameSpaceDrawingMLChart = "http://schemas.openxmlformats.org/drawingml/2006/chart" NameSpaceDrawingMLSpreadSheet = "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" - NameSpaceSpreadSheet = "http://schemas.openxmlformats.org/spreadsheetml/2006/main" - NameSpaceSpreadSheetX14 = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" NameSpaceSpreadSheetX15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" NameSpaceSpreadSheetExcel2006Main = "http://schemas.microsoft.com/office/excel/2006/main" NameSpaceMacExcel2008Main = "http://schemas.microsoft.com/office/mac/excel/2008/main" |