Anonymize FO files
Some time ago I had the need to post a customer's XSL-FO file to a mailing list. The problem was: how to strip all the content out of the file without destroying the overall design (that's what the question was about)? So I wrote a small PHP script which replaces all characters outside of XML tags with "x", but leaves everything else as-is. This probably works for every other valid XML-file, too.
Get the script: fo-anonymize.cli.php
Usage:
$ cat your-file.fo | php fo-anonymize.cli.php > your-file-anonymized.fo