Update of /cvsroot/xdoclet/xdoclet/core/src/xdoclet/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14655/core/src/xdoclet/util
Modified Files: XmlValidator.java Log Message: better debug output and less failure if the SAXParser does not support JAXP Schema Validation and a fix for mixed schema and DTD validation in the same task Index: XmlValidator.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/util/XmlValidator.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** XmlValidator.java 1 Mar 2005 20:57:49 -0000 1.18 --- XmlValidator.java 30 Mar 2005 21:07:46 -0000 1.19 *************** *** 223,226 **** --- 223,235 ---- /** + * Resets the Validator + */ + public void reset() + { + _schemas.clear(); + _dtds.clear(); + } + + /** * Returns whether this validator should validate against a XML Schema * *************** *** 399,402 **** --- 408,414 ---- try { parser = factory.newSAXParser(); + if (log.isDebugEnabled()) { + log.debug("SAX Parser crated class=" + parser.getClass()); + } } catch (ParserConfigurationException e) { *************** *** 418,426 **** parser.setProperty(JAXP_SCHEMA_SOURCE, _schemas.toArray(new String[_schemas.size()])); } ! catch (SAXNotRecognizedException e) { ! log.warn(Translator.getString(XDocletUtilMessages.class, XDocletUtilMessages.PARSER_DOES_NOT_SUPPORT_XSD_VALIDATION)); ! } ! catch (SAXNotSupportedException e) { log.warn(Translator.getString(XDocletUtilMessages.class, XDocletUtilMessages.PARSER_DOES_NOT_SUPPORT_XSD_VALIDATION)); } } --- 430,440 ---- parser.setProperty(JAXP_SCHEMA_SOURCE, _schemas.toArray(new String[_schemas.size()])); } ! catch (SAXException e) { ! // no validation at all if schema validation is requested but not supported by the parser ! // to avoid errors when the parser tries to find DTD's which are not available ! factory.setValidating(false); ! parser = factory.newSAXParser(); log.warn(Translator.getString(XDocletUtilMessages.class, XDocletUtilMessages.PARSER_DOES_NOT_SUPPORT_XSD_VALIDATION)); + log.debug("JAXP 1.2 schema validation properties not recognized", e); } } ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel