Skip to content

Commit

Permalink
Additional default OOXML namespace aliases (#97)
Browse files Browse the repository at this point in the history
The http:https://schemas.microsoft.com/office/word/2010/wordprocessingGroup namespace is expected to have an alias of "wpg" by LO 6.4. Having a different alias caused LibreOffice to not display grouped drawings.
I copied some additional default namespace aliases from sample files, to hopefully prevent such errors in the future.
  • Loading branch information
mbali committed Sep 21, 2021
1 parent 2327ee2 commit 829d151
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion src/stencil/ooxml.clj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,51 @@
(def attr-ilvl :xmlns.http%3A%2F%2Fschemas.openxmlformats.org%2Fwordprocessingml%2F2006%2Fmain/ilvl)

(def default-aliases
{"http:https://schemas.microsoft.com/office/word/2010/wordprocessingShape" "wps"})
{;default namespace aliases from a LibreOffice 6.4 OOXML Text document
"http:https://schemas.openxmlformats.org/markup-compatibility/2006" "mc"
"urn:schemas-microsoft-com:office:office" "o"
"http:https://schemas.openxmlformats.org/officeDocument/2006/relationships" "r"
"urn:schemas-microsoft-com:vml" "v"
"http:https://schemas.openxmlformats.org/wordprocessingml/2006/main" "w"
"urn:schemas-microsoft-com:office:word" "w10"
"http:https://schemas.microsoft.com/office/word/2010/wordml" "w14"
"http:https://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" "wp"
"http:https://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" "wp14"
"http:https://schemas.microsoft.com/office/word/2010/wordprocessingGroup" "wpg"
"http:https://schemas.microsoft.com/office/word/2010/wordprocessingShape" "wps"
;additional aliases from a new MS Word docx file
"http:https://schemas.microsoft.com/office/drawing/2016/ink" "aink"
"http:https://schemas.microsoft.com/office/drawing/2017/model3d" "am3d"
"http:https://schemas.microsoft.com/office/drawing/2014/chartex" "cx"
"http:https://schemas.microsoft.com/office/drawing/2015/9/8/chartex" "cx1"
"http:https://schemas.microsoft.com/office/drawing/2015/10/21/chartex" "cx2"
"http:https://schemas.microsoft.com/office/drawing/2016/5/9/chartex" "cx3"
"http:https://schemas.microsoft.com/office/drawing/2016/5/10/chartex" "cx4"
"http:https://schemas.microsoft.com/office/drawing/2016/5/11/chartex" "cx5"
"http:https://schemas.microsoft.com/office/drawing/2016/5/12/chartex" "cx6"
"http:https://schemas.microsoft.com/office/drawing/2016/5/13/chartex" "cx7"
"http:https://schemas.microsoft.com/office/drawing/2016/5/14/chartex" "cx8"
"http:https://schemas.openxmlformats.org/officeDocument/2006/math" "m"
"http:https://schemas.microsoft.com/office/word/2012/wordml" "w15"
"http:https://schemas.microsoft.com/office/word/2018/wordml" "w16"
"http:https://schemas.microsoft.com/office/word/2018/wordml/cex" "w16cex"
"http:https://schemas.microsoft.com/office/word/2018/wordml/cid" "w16cid"
"http:https://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" "w16sdtdh"
"http:https://schemas.microsoft.com/office/word/2015/wordml/symex" "w16se"
"http:https://schemas.microsoft.com/office/word/2006/wordml" "wne"
"http:https://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" "wpc"
"http:https://schemas.microsoft.com/office/word/2010/wordprocessingInk" "wpi"
;additional aliases from a LibreOffice 6.4 OOXL spreadsheet file
"http:https://schemas.microsoft.com/office/spreadsheetml/2009/9/main" "x14"
"http:https://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" "xdr"
;additional aliases from a sample MS Excel xlsx file
"http:https://schemas.microsoft.com/office/spreadsheetml/2010/11/main" "x15"
"http:https://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" "x14ac"
"http:https://schemas.microsoft.com/office/spreadsheetml/2014/revision" "xr"
"http:https://schemas.microsoft.com/office/spreadsheetml/2015/revision2" "xr2"
"http:https://schemas.microsoft.com/office/spreadsheetml/2016/revision3" "xr3"
"http:https://schemas.microsoft.com/office/spreadsheetml/2016/revision6" "xr6"
"http:https://schemas.microsoft.com/office/spreadsheetml/2016/revision10" "xr10"})

;; drawing, binary large image or picture
(def blip :xmlns.http%3A%2F%2Fschemas.openxmlformats.org%2Fdrawingml%2F2006%2Fmain/blip)

0 comments on commit 829d151

Please sign in to comment.