
Dear George, At 04:24 AM 7/23/2010, George Cristian Bina wrote:
When you use XInclude and DTDs the validation is performed on each file as it is (with the XInclude elements not expanded). This is how Xerces works - I opened some time ago a discussion about support for post validation, you can find that here: http://mail-archives.apache.org/mod_mbox/xerces-j-dev/200507.mbox/thread see the "Xinclude with XML Schema versus XInclude with DTD" messages
I'm glad to see the question has come up (as I suspected it would have :-).
If you use XML Schema or Relax NG or Schematron then the validation will be performed on a document with all the XInclude elements replaced with the included content.
Okay.
A possible solution if you need to stay with DTDs is to move the ID/IDREF constraints from DTDs to a Schematron schema. That needs to be applied only on the main document and as I said above the resolved document will be seen by the Schematron validation.
Right: I've considered this, but of course we also want the pull-down menus we get from ID/IDREF.
Another solution is to use LIBXML for validation - by default we set the --postvalid option on LIBXML that makes the processor perform the DTD validation after the XInclude processing, thus validating the resolved document against the DTD of the main file.
Very interesting: we will try this. Hey! It seems to work! Thanks. Thanks! Wendell ====================================================================== Wendell Piez mailto:wapiez@mulberrytech.com Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================