KP-10981 rm xml_pp, introduce pretty_print, fix typo
diff --git a/klk2eureco.sh b/klk2eureco.sh
index 7fe0386..16e85ad 100755
--- a/klk2eureco.sh
+++ b/klk2eureco.sh
@@ -100,16 +100,16 @@
 	mkdir -p $TEI/$SOURCE
 	t="$TEI/$SOURCE/$BASENAME.$TEIFORMAT.xml"
 	
-	echo "  generating $t using vrt2tei.pl, and prettifying..."
+	echo "  generating $t using vrt2tei.pl..."
 	perl vrt2tei.pl -t $TEIFORMAT $MASK $x |
-	    xml_pp |                           # xml_pp works but takes ages;
 	    gawk -f rearrange-idsDoc.awk > $t  # rearranging the start and end tag of idsDoc
-	                                       # xmllint- format geht out of memory und --stream machen funktioniert nicht
+	                                       # pretty-printing now done in-process by XML::Twig (pretty_print => 'record'),
+	                                       # replacing the old xml_pp re-parse pass (xmllint --format runs out of memory, --stream can't format)
 	ls -l $t
 
 	# if $t is empty, remove it:
-	if [ ! -s $i ]; then
-	    rm -f $i
+	if [ ! -s $t ]; then
+	    rm -f $t
 	fi
 
 	# validating $t: