Bug 65061

Summary: Handle VmlDrawings containing spreadsheet-ml default namespace
Product: POI Reporter: Andreas Beeker <kiwiwings>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.1.x-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: excel containing vmldrawing with invalid default namespace

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