xmlxsltsaxonxmlcatalog

Are there drawbacks to setting up a catalog file to an dummy dtd when transforming XML using XSLT


Setting up a catalog file to point an empty file to serve as the DTD of an XML file with a DOCTYPE-declaration can work fine. But are there any drawbacks for the Saxon engine? Would processing the XML be more efficient if a copy of the right DTD was made locally available? Or would that depend on the (complexity/simplicity) of the XLST at hand? (Assuming in the latter situation that the XML is valid against the supplied DTD)


Solution

  • Obviously if the document contains entity references then parsing may fail if these are not present in the DTD. Otherwise, if you're not validating, and don't care about ID attributes, then the DTD serves no useful purpose, and a dummy will work just as well.