nddelima 2005/06/13 14:12:48 Modified: java/src/org/apache/xerces/dom DOMConfigurationImpl.java Log: Additional updates to DOMConfiguration in support of the DOMNormalizer bug fix http://cvs.apache.org/viewcvs.cgi/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java?r1=1.60&r2=1.61&diff_format=h Revision Changes Path 1.34 +12 -9 xml-xerces/java/src/org/apache/xerces/dom/DOMConfigurationImpl.java Index: DOMConfigurationImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMConfigurationImpl.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- DOMConfigurationImpl.java 2 May 2005 22:02:22 -0000 1.33 +++ DOMConfigurationImpl.java 13 Jun 2005 21:12:48 -0000 1.34 @@ -29,6 +29,7 @@ import org.apache.xerces.impl.Constants; import org.apache.xerces.impl.XMLEntityManager; import org.apache.xerces.impl.XMLErrorReporter; +import org.apache.xerces.impl.dv.DTDDVFactory; import org.apache.xerces.impl.msg.XMLMessageFormatter; import org.apache.xerces.impl.validation.ValidationManager; import org.apache.xerces.util.DOMEntityResolverWrapper; @@ -92,7 +93,9 @@ protected static final String SEND_PSVI = Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_AUGMENT_PSVI; - + protected final static String DTD_VALIDATOR_FACTORY_PROPERTY = + Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY; + // property identifiers /** Property identifier: entity manager. */ @@ -247,7 +250,8 @@ VALIDATION_MANAGER, GRAMMAR_POOL, JAXP_SCHEMA_SOURCE, - JAXP_SCHEMA_LANGUAGE + JAXP_SCHEMA_LANGUAGE, + DTD_VALIDATOR_FACTORY_PROPERTY }; addRecognizedProperties(recognizedProperties); @@ -272,6 +276,8 @@ setProperty(ERROR_REPORTER, fErrorReporter); addComponent(fErrorReporter); + setProperty(DTD_VALIDATOR_FACTORY_PROPERTY, DTDDVFactory.getInstance()); + XMLEntityManager manager = new XMLEntityManager(); setProperty(ENTITY_MANAGER, manager); addComponent(manager); @@ -679,12 +685,9 @@ Constants.NS_XMLSCHEMA); } else if (value.equals(Constants.NS_DTD)) { - // REVISIT: revalidation against DTDs is not supported - String msg = DOMMessageFormatter.formatMessage( - DOMMessageFormatter.DOM_DOMAIN, - "FEATURE_NOT_SUPPORTED", - new Object[] { name }); - throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); + // Added support for revalidation against DTDs + setProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE, + Constants.NS_DTD); } } catch (XMLConfigurationException e) {}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
