You can use an EntityResolver to redirect the XML parser to use a different DTD, provided it already refers to a DTD within the document. If you don't want to write your own EntityResolver, you can use the Sun EntityResolver that works from an OASIS catalog file: see
There's a limit to how much you can control from the command line. At some stage it might be worth thinking of driving Saxon (and the XML parser) from your own Java application, which gives you a lot more control.
Michael Kay

From: [] On Behalf Of Feese, Sebastian
Sent: 22 November 2006 16:00
Subject: [saxon] Validate against different dtd


I've been using the -v flag to validate source documents from the command line.

But is it somehow possible to validate my xml file against a different dtd that I can specify via the command line?

Thanks for your help,