Index: intltool-merge.in.in
===================================================================
RCS file: /cvs/gnome/intltool/intltool-merge.in.in,v
retrieving revision 1.82
diff -u -r1.82 intltool-merge.in.in
--- intltool-merge.in.in	6 Dec 2003 13:22:58 -0000	1.82
+++ intltool-merge.in.in	11 Dec 2003 10:06:46 -0000
@@ -47,17 +47,6 @@
     die "You must have XML::Parser installed to run $0\n\n";
 } 
 
-## Add dir to own perl modules
-my $dir = dirname($0);
-push @INC, "@EXPANDED_DATADIR@/@PACKAGE@";
-push @INC, "$dir/modules";
-push @INC, "$dir/intltool-modules";
-
-$ret = eval 'require XML::Parser::Style::OrigTree';
-if(!$ret) {
-    die "The OrigTree module doesn't seem to be properly installed $0\n\n";
-}
-
 my $must_end_tag      = -1;
 my $last_depth        = -1;
 my $translation_depth = -1;
@@ -850,6 +839,20 @@
     }
 }
 
+sub intltool_tree_char
+{
+    my $expat = shift;
+    my $text = shift;
+    my $clist = $expat->{Curlist};
+    my $pos = $#$clist;
+  
+    if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+        $clist->[$pos] .= $expat->original_string();
+    } else {
+        push @$clist, 0 => $expat->original_string();
+    }
+}
+
 sub readXml
 {
     my $filename = shift || return;
@@ -857,7 +860,8 @@
         die "ERROR Cannot find filename: $filename\n";
     }
 
-    my $xp = new XML::Parser(Style => 'XML::Parser::Style::OrigTree');
+    my $xp = new XML::Parser(Style => 'Tree');
+    $xp->setHandlers(Char => \&intltool_tree_char);
     my $tree = $xp->parsefile($filename);
 
 # <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
