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
 
http://www.dpawson.co.uk/docbook/catalogs.html
 
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
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Feese, Sebastian
Sent: 22 November 2006 16:00
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Validate against different dtd

Hello,

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,
Sebastian.