_half_decent_appendWellBalancedChunk() is now always called with an
authorMike Taylor <mike@indexdata.com>
Thu, 2 Aug 2007 11:27:32 +0000 (11:27 +0000)
committerMike Taylor <mike@indexdata.com>
Thu, 2 Aug 2007 11:27:32 +0000 (11:27 +0000)
XML node and never with an XPath Context object.  The latter doesn't
work now, although it did in the past: I can only assume that a
subsequent package update of libxml2 has broken the old API.

lib/ZOOM/IRSpy/Record.pm

index 4ba8bb6..6f80ac3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Record.pm,v 1.25 2007-05-04 12:09:24 mike Exp $
+# $Id: Record.pm,v 1.26 2007-08-02 11:27:32 mike Exp $
 
 package ZOOM::IRSpy::Record;
 ### I don't think there's any reason for this to be separate from
 
 package ZOOM::IRSpy::Record;
 ### I don't think there's any reason for this to be separate from
@@ -82,7 +82,8 @@ sub append_entry {
        # fully general version would work its way through each
        # component of the XPath, but for now we just treat it as a
        # single chunk to go inside the top-level node.
        # fully general version would work its way through each
        # component of the XPath, but for now we just treat it as a
        # single chunk to go inside the top-level node.
-       $this->_half_decent_appendWellBalancedChunk($xc, "<$xpath></$xpath>");
+       $this->_half_decent_appendWellBalancedChunk($xc->getContextNode(),
+                                                   "<$xpath></$xpath>");
        @nodes = $xc->findnodes($xpath);
        die("still no matches for '$xpath' after creating: can't append")
            if @nodes == 0;
        @nodes = $xc->findnodes($xpath);
        die("still no matches for '$xpath' after creating: can't append")
            if @nodes == 0;
@@ -146,6 +147,7 @@ sub _half_decent_appendWellBalancedChunk {
 
     if (1) {
        $frag =~ s,>, xmlns:irspy="$ZOOM::IRSpy::Utils::IRSPY_NS">,;
 
     if (1) {
        $frag =~ s,>, xmlns:irspy="$ZOOM::IRSpy::Utils::IRSPY_NS">,;
+       warn "calling appendWellBalancedChunk($node)";
        $node->appendWellBalancedChunk($frag);
        return;
     }
        $node->appendWellBalancedChunk($frag);
        return;
     }