Bug 65061 - Handle VmlDrawings containing spreadsheet-ml default namespace
Summary: Handle VmlDrawings containing spreadsheet-ml default namespace
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.1.x-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 11:49 UTC by Andreas Beeker
Modified: 2021-01-06 12:46 UTC (History)
0 users



Attachments
excel containing vmldrawing with invalid default namespace (137.38 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-01-06 11:49 UTC, Andreas Beeker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2021-01-06 11:49:17 UTC
Created attachment 37691 [details]
excel containing vmldrawing with invalid default namespace

The regression test came up with a few failing documents containing vmlDrawing1.xmls which have a spreadsheet-ml default namespace [1].

This is wrong and needs to be workaround - i.e. vml drawings have no root namespace [2].

I can think of three ways to workaround it:
a) remove the namespace before parsing the file
b) replace the namespace in the loaded XmlObject
c) keep it inside and ignore it

I've picked a).
contra b): works, but the document is modified after it's validated.
contra c): writing the drawing back again keeps the erroneous declaration.
and the XmlBeans accessor doesn't work too. 

I still need to test my modifications, but the fix will be applied soon.


[1] http://schemas.openxmlformats.org/spreadsheetml/2006/main

[2] https://c-rex.net/projects/samples/ooxml/e1/Part1/OOXML_P1_Fundamentals_VML_topic_ID0EZ5EO.html
Comment 1 Andreas Beeker 2021-01-06 12:46:44 UTC
applied via r1885197