package net.sf.jasperreports.engine.xml;

import net.sf.jasperreports.engine.JRPropertiesHolder;
import org.apache.commons.digester.Rule;
import org.xml.sax.Attributes;

public class JRPropertyDigesterRule extends Rule {
  public void begin(String namespace, String name, Attributes attributes) {
    JRPropertiesHolder propertiesHolder = (JRPropertiesHolder)this.digester.peek();
    String key = attributes.getValue("name");
    String value = attributes.getValue("value");
    propertiesHolder.getPropertiesMap().setProperty(key, value);
  }
}
