package com.innodata.xerces;

import javax.xml.parsers.ParserConfigurationException;

import org.apache.xerces.jaxp.SAXParserFactoryImpl;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;

public class ValidatingSAXParserFactory extends SAXParserFactoryImpl {

	public ValidatingSAXParserFactory() throws SAXNotRecognizedException, SAXNotSupportedException, ParserConfigurationException {
		this.setFeature("http://xml.org/sax/features/validation", true);
		this.setFeature("http://apache.org/xml/features/validation/dynamic", true);
		this.setFeature("http://apache.org/xml/features/validation/schema", true);
		this.setFeature("http://apache.org/xml/features/validation/schema/normalized-value", true);
		this.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
		
	}

}