final XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebMetaData webMetaData = WebMetaDataParser.parse(xmlReader, dtdInfo);
if (schemaValidation && webMetaData.getSchemaLocation() != null) {
XMLSchemaValidator validator = new XMLSchemaValidator(new XMLResourceResolver());
InputStream xmlInput = webXml.openStream();
try {
if (webMetaData.is23())
validator.validate("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", xmlInput);
else if(webMetaData.is24())
validator.validate("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", xmlInput);