Acid test environment for entitiesVery few XML processors correctly handle external entities. XP by James Clark found at http://www.jclark.com/xml/xp was the first, and for a long time the only, XML processor to do so. Now more and more XML processors are handling these properly as a result of testing this acid test environment. The package of files is found in acid-20030730.zip. For example, just run your XML processor with any of acid.xml, aciddtd.xml, or acid-fo.xsl files. Other tests are included in the ZIP. The file acid-fo.xsl exists so you can test either or both of an XSLT processor or an XSL-FO processor. Here is a typical result of a non-conforming XML processor, followed by running the XT XSLT processor that contains the conforming XP XML processor: T:\acid>xml acid.xml Processing: 'acid.xml' for XML validation errors (-w for wellformedness) Fatal Error at (file acid.ent, line 2, char 4): Conditional section in internal subset T:\acid>xml aciddtd.xml Processing: 'aciddtd.xml' for XML validation errors (-w for wellformedness) Fatal Error at (file acid.ent, line 2, char 4): Conditional section in internal subset T:\acid>xt acid.xml acid-fo.xsl <?xml version="1.0" encoding="utf-8"?> <root font-family="Times" font-size="20pt" xmlns="http://www.w3.org/1999/XSL/Format"> <layout-master-set> <simple-page-master master-name="frame" page-height="297mm" page-width="210mm" margin-top="20mm" margin-bottom="20mm" margin-left="20mm" margin-right="20mm"> <region-body region-name="frame-body"/> </simple-page-master> </layout-master-set> <page-sequence master-name="frame"> <flow flow-name="frame-body"> <block>This is a test</block> </flow> </page-sequence> </root> T:\acid>xt aciddtd.xml acid-fo.xsl <?xml version="1.0" encoding="utf-8"?> <root font-family="Times" font-size="20pt" xmlns="http://www.w3.org/1999/XSL/Format"> <layout-master-set> <simple-page-master master-name="frame" page-height="297mm" page-width="210mm" margin-top="20mm" margin-bottom="20mm" margin-left="20mm" margin-right="20mm"> <region-body region-name="frame-body"/> </simple-page-master> </layout-master-set> <page-sequence master-name="frame"> <flow flow-name="frame-body"> <block>This is a test</block> </flow> </page-sequence> </root> T:\acid> Note how the XML processor above complains, but the XT processor doesn't complain. Vendors I've shared this with have repeatedly concurred that these XML files I've created are well-formed and that all conformant XML processors should accept them. As a favour, we would appreciate hearing from vendors who have detected and resolved problems using this acid test. We are pleased to have been helping others with this in the past. |
CRANE
SOFTWRIGHTS LTD. |
Link traversal: This web site relies heavily on client-side redirection. If certain links do not work for you, please ensure you have this behaviour enabled in your browser.
Small print: All use of this web site and all business conducted with Crane Softwrights Ltd. is subject to the legal disclaimers detailed at http://www.CraneSoftwrights.com/legal ... please contact us if you have any questions. All trademarks, servicemarks, registered trademarks, and registered servicemarks are the property of their respective owners.
Link legend: links that are marked with this dotted underline will open up a new browser window, otherwise the same browser window is used for the link target.