mrglavas 2005/07/25 11:04:26 Modified: java/src/org/apache/xerces/xinclude XIncludeHandler.java Log: Fixing JIRA Issue #1089: http://issues.apache.org/jira/browse/XERCESJ-1089 When both the schema validation and validation features have been turned on, to be consistent with what occurs on the main pipeline, DTD validation should occur if the document being processed on the child pipeline has a DOCTYPE. If no DOCTYPE is present then no errors should be reported. This is controlled by turning on the dynamic validation feature. Revision Changes Path 1.56 +10 -6 xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java Index: XIncludeHandler.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- XIncludeHandler.java 13 Jul 2005 17:59:21 -0000 1.55 +++ XIncludeHandler.java 25 Jul 2005 18:04:26 -0000 1.56 @@ -550,14 +550,18 @@ fSettings = new ParserConfigurationSettings(); copyFeatures(componentManager, fSettings); - // we don't want a schema validator on the new pipeline, - // so if it was enabled, we set the feature to false as - // well as other validation features. + // We don't want a schema validator on the new pipeline, + // so if it was enabled, we set the feature to false. If + // the validation feature was also enabled we turn on + // dynamic validation, so that DTD validation is performed + // on the included documents only if they have a DOCTYPE. + // This is consistent with the behaviour on the main pipeline. try { if (componentManager.getFeature(SCHEMA_VALIDATION)) { fSettings.setFeature(SCHEMA_VALIDATION, false); - fSettings.setFeature(DYNAMIC_VALIDATION, false); - fSettings.setFeature(VALIDATION, false); + if (componentManager.getFeature(VALIDATION)) { + fSettings.setFeature(DYNAMIC_VALIDATION, true); + } } } catch (XMLConfigurationException e) {}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
