Relationships not loaded if document comes before in package
Status: Beta
Brought to you by:
neodante
When loading a package, relationships are loaded when a part is loaded by looking for an already loaded part having the same name as the part with the ".rels" extension appended.
However this fails when the part comes before the corresponding .rels file in the Zip package, because the code looks for the latter only in the set of already loaded parts.
This is demonstrated by the test case I added as test.org.openxml4j.opc.TestRelationships. In the file that is loaded, /xl/worksheets/sheet2.xml comes before /xl/worksheets/_rels/sheet2.xml.rels so no relationships are defined for sheet2.xml.