RELAX NG

RELAX NG and Its Compact Syntax

RELAX NG (OASIS 2001, later ISO/IEC 19757-2), by James Clark and Murata Makoto, describes documents with patterns rather than types, borrows XSD's datatypes and has a compact syntax; DocBook 5, TEI and OpenDocument publish their schemas in it. Jing 258 validates it and Trang converts it, both Java jars from one release:

Installing Jing and Trang with two small wrappersShell
cd ~/xml-tools && r=https://github.com/relaxng/jing-trang/releases/download/V20241231
for t in jing trang; do
  [ -f $t-20241231.zip ] || curl -fsSLO --retry 5 --retry-all-errors $r/$t-20241231.zip
  unzip -oq $t-20241231.zip
done
printf '#!/bin/sh\nexec java -jar %s "$@"\n' ~/xml-tools/jing-20241231/bin/jing.jar > ~/bin/jing
printf '#!/bin/sh\nexec java -jar %s "$@"\n' ~/xml-tools/trang-20241231/trang.jar > ~/bin/trang
chmod +x ~/bin/jing ~/bin/trang && jing 2>&1 | head -n 1
Output
Jing version 20241231

Subsections