File: fix-xpathcontext

package info (click to toggle)
biber 2.20-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 12,436 kB
  • sloc: perl: 17,354; sh: 1,084; xml: 896; makefile: 11
file content (20 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
fix a strange failure during testing where a call to registerNs
gives an error about cannot *unregister*.

Thanks to Don Armstrong for providing the idea
---
 lib/Biber/Input/file/biblatexml.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- biber.orig/lib/Biber/Input/file/biblatexml.pm
+++ biber/lib/Biber/Input/file/biblatexml.pm
@@ -122,7 +122,8 @@ sub extract_entries {
   $xml = NFD($xml);# Unicode NFD boundary
   my $bltxml = XML::LibXML->load_xml(string => $xml);
   my $xpc = XML::LibXML::XPathContext->new($bltxml);
-  $xpc->registerNs($NS, $BIBLATEXML_NAMESPACE_URI);
+  my $tmp = $BIBLATEXML_NAMESPACE_URI;
+  $xpc->registerNs($NS, $tmp);
 
   if ($section->is_allkeys) {
     if ($logger->is_debug()) {# performance tune