# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1402909861 -7200
# Node ID 7bd195a5fa2ac06bfdc7236ce42feccc0b983198
# Parent  058c1c39251e45ecfe73bf8b13ee24102db4ebb8
AbstractAlt2XmlReader: support features

diff -r 058c1c39251e -r 7bd195a5fa2a java/alt2xml-lib-input/src/cz/frantovo/alt2xml/AbstractAlt2XmlReader.java
--- a/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/AbstractAlt2XmlReader.java	Sun Jun 15 14:50:49 2014 +0200
+++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/AbstractAlt2XmlReader.java	Mon Jun 16 11:11:01 2014 +0200
@@ -42,6 +42,7 @@
 	protected DTDHandler dtdHandler;
 	protected EntityResolver entityResolver;
 	protected Map<String, Object> properties = new HashMap<>();
+	protected Map<String, Boolean> features = new HashMap<>();
 
 	@Override
 	public void parse(String systemId) throws IOException, SAXException {
@@ -56,12 +57,16 @@
 		 * the http://xml.org/sax/features/namespaces
 		 * and the http://xml.org/sax/features/namespace-prefixes feature names.
 		 */
-		throw new SAXNotSupportedException("Zatím není podporováno.");
+		Boolean feature = features.get(name);
+		return feature == null ? false : feature;
 	}
 
 	@Override
 	public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
-		throw new SAXNotSupportedException("Zatím není podporováno.");
+		/**
+		 * TODO: filtrovat – povolit jen náš jmenný prostor
+		 */
+		features.put(name, value);
 	}
 
 	@Override