Bug 55924 - [PATCH] xml export and minOccurs=0 issue
Summary: [PATCH] xml export and minOccurs=0 issue
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-12-23 12:30 UTC by Marc
Modified: 2014-02-03 20:18 UTC (History)
0 users

[PATCH] Patch (7.65 KB, application/octet-stream)
2013-12-23 13:55 UTC, Marc

Note You need to log in before you can comment on or make changes to this bug.
Description Marc 2013-12-23 12:30:17 UTC
Xml export of an excel document fails if it contains empty cells which are mapped to an xml element of type double and attribute minOccurs=0.

Poi fails to export such documents because it fills in an empty string into these xml tags. This leads to a schema validation exception in case of an element with a double datatype.

The patch I'm going to provide handles it the same way as Excel does. It removes empty elements from the output xml.
Comment 1 Marc 2013-12-23 13:55:13 UTC
Created attachment 31145 [details]
[PATCH] Patch
Comment 2 Dominik Stadler 2014-02-03 20:18:15 UTC
Thanks a lot for all these patches, this one is now applied as well via r1564045.