Skip Menu |

This queue is for tickets about the OpenOffice-OODoc CPAN distribution.

Report information
The Basics
Id: 100185
Status: new
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: DMITRI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in XPath prevents Flat XML support
OpenOffice::OODoc::XPath::_get_flat_file contains a typo which breaks Flat XML support. I am attaching a fix. P.S. Another issue that I've run into is that to use the Flat XML format, I have to specify "element" in the constructor: my $doc = odfDocument(file => $input_filename, flat_xml => 1, element => 'office:document', ); I think this should be in the documentation.
Subject: flat-xml-patch.txt
--- XPath.pm-orig 2014-11-07 12:01:30.388001621 -0500 +++ XPath.pm-fix 2014-11-07 12:02:49.505001481 -0500 @@ -458,10 +458,9 @@ sub _get_flat_file # get fl { my $doc = shift; my $source = $doc->{'file'}; - $doc->{'xpath'} = UNIVERSAL::isa($source, 'IO::File') ? + return UNIVERSAL::isa($source, 'IO::File') ? $doc->{'twig'}->safe_parse($source) : $doc->{'twig'}->safe_parsefile($source); - return $doc->{'path'}; } sub new