Project

Profile

Help

Validation with Xerces. How to?

Added by Anonymous about 19 years ago

Legacy ID: #3339945 Legacy Poster: jerzy wolowik (jwdevdemon)

Dear Folks, I've just started my journey with Docbook, so document validation against DTD is 'a must' . As a XSL Processor I choose Saxon 6.5.4. As a XML Parser I choose Xerces -j-2.7.1. (Pleae comment on my choice!) The problem is I don't know how to turn on document validation against DTD in command line mode - writing an app is just premature at this moment. Please, point me out to the some good source or give an advice. All I've found seems to be incomplete (docbook.org, sagehill.net) Best regards, jw


Replies (1)

RE: Validation with Xerces. How to? - Added by Anonymous about 19 years ago

Legacy ID: #3339984 Legacy Poster: Michael Kay (mhkay)

Saxon 8.x has a -v option on the command line to switch on DTD validation in the XML parser. There's no equivalent in Saxon 6.5.4, unfortunately: the only way to do it is to write some Java (you can write a "proxy parser" that invokes Xerces with validation enabled, and select this proxy as your parser using the -x option on the command line: a bit long-winded, I'm afraid. The simplest option might be to use Saxon 8.x. It processes XSLT 1.0 stylesheets pretty well. The only problem is that you'll find it difficult to resist using the new XSLT 2.0 features. Michael Kay

    (1-1/1)

    Please register to reply