Subject: | Patch to fix when attributes in <Relationship> element appear in different order |
XML allows attributes to appear in any order, but Spreadsheet::XLSX
looks for <Relationship> targs containing the Id attribute followed by
the Target attribute. If these attributes appear in a different order
it breaks. Here is a patch to fix:
--- /usr/share/perl5/vendor_perl/Spreadsheet/XLSX.pm 2012-06-07
11:21:05.601607159 +0100
+++ ./XLSX.pm 2012-08-15 16:20:37.122263889 +0100
@@ -88,9 +88,12 @@
foreach ($member_rels -> contents =~ /\<Relationship (.*?)\/?\>/g) {
- /^Id="(.*?)".*?Target="(.*?)"/ or next;
+ /\bId="(.*?)"/ or next;
+ my $id = $1;
+ /\bTarget="(.*?)"/ or next;
+ my $target = $1;
- $rels {$1} = $2;
+ $rels {$id} = $target;
}