Bug 57484 - [PATCH] Allow processing of non-OOXML core namespace packages
Summary: [PATCH] Allow processing of non-OOXML core namespace packages
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 58087
  Show dependency tree
 
Reported: 2015-01-22 17:55 UTC by virtuald
Modified: 2015-07-19 12:12 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description virtuald 2015-01-22 17:55:01 UTC
This is to allow using the POIXMLDocument/POIXMLDocumentPart objects to parse OOXML packages that don't use the default OOXML namespace. The use case I have in mind is Visio vsdx files.

This should not change any behavior for existing uses of the POIXMLDocument/POIXMLDocumentPart objects.

Patch at https://github.com/apache/poi/pull/17
Comment 1 virtuald 2015-01-22 17:57:26 UTC
For additional info, visio documents use the "http://schemas.microsoft.com/visio/2010/relationships/document" namespace for relationships, not "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", which is why this patch is required.
Comment 2 virtuald 2015-02-25 18:58:37 UTC
This is a pretty simple fix, can this be merged in? Thanks!
Comment 3 virtuald 2015-06-10 14:34:23 UTC
I noticed that there was a merge conflict, so I just rebased it and it's mergable again. Is there anything I can do to speed this along? Thanks!
Comment 4 Dominik Stadler 2015-07-01 12:27:20 UTC
Can you also add a few unit tests which verify the changed/added code parts? This way we ensure that it does not break with future changes.
Comment 5 virtuald 2015-07-06 02:27:57 UTC
Sorry for the delay, I've been on vacation the last few days...

The changes should be mostly covered by existing tests that parse files that use the PackageRelationshipTypes.CORE_DOCUMENT namespace. The only thing that isn't covered is creating a POIXMLDocument with the new constructor. 

I suppose I could add a test case that calls the second constructor with PackageRelationshipTypes.CORE_DOCUMENT just for coverage's sake.

Or do you want me to add a document that doesn't use CORE_DOCUMENT namespace to the test suite just for completeness? AFAIK the only thing that uses a non-core namespace are visio documents, and poi doesn't support them (yet), so it'd be odd to add a vsdx to the unit tests.
Comment 6 Dominik Stadler 2015-07-07 20:26:03 UTC
Yes, it would be good to have a test-file which has such a different structure so we can verify that we can at least read some information from those as well. We already have some other files in the test-suite just to ensure that we can read some properties from them. We even have test files to verify that we cannot read them because they are corrupt!
Comment 7 virtuald 2015-07-16 16:45:55 UTC
Sorry for the delay, was on vacation. :) 

Looks like there was already a vsdx file in the test data, so I've removed the non-working version of the test and added a stub for future XDGF support, which uses the behavior introduced by this patch.
Comment 8 Dominik Stadler 2015-07-19 12:12:54 UTC
This is now applied via r1691821, thanks for the nice patch and work on the stress-test-suite!