diff bin/normXML @ 0:2aa53823fb21

new repo
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sat, 06 Jun 2026 10:19:04 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/normXML	Sat Jun 06 10:19:04 2026 +0100
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ "$1" = "-w" ]
+ then
+  shift
+  rxp -c ASCII -o 1 "$@" | sed '/0/s/ISO-646/utf-8/;s/&#9;/         /g;s/> *&#10; *</>\
+</g;s/&#10;/ /g' | tr -s ' ' ' ' | sed '/></s@<\([_.a-zA-Z][^ >]*\)\([^>]*\)></\1>@<\1\2/>@g;s/> *</>\
+</g'
+ else
+  rxp -d "$@"
+fi