
package org.apache.fop.fo.properties;

import org.apache.fop.datatypes.*;
import org.apache.fop.fo.*;
import org.apache.fop.apps.FOPException;
import org.apache.fop.messaging.MessageHandler;

public class XMLSpaceMaker extends  EnumProperty.Maker implements XMLSpace {



  protected final static EnumProperty s_propPRESERVE = new EnumProperty(PRESERVE);

  protected final static EnumProperty s_propDEFAULT = new EnumProperty(DEFAULT);


    static public Property.Maker maker(String propName) {
	return new XMLSpaceMaker(propName);
    }

    protected XMLSpaceMaker(String name) {
	super(name);

    }


   public boolean isInherited() { return true; }

    public Property checkEnumValues(String value) {
    
      if (value.equals("preserve")) { return s_propPRESERVE; }
    
      if (value.equals("default")) { return s_propDEFAULT; }
    
	return super.checkEnumValues(value);
    }

    private Property m_defaultProp=null;
  
    public Property make(PropertyList propertyList) throws FOPException {
      
        if (m_defaultProp == null) {
            m_defaultProp=make(propertyList, "default", propertyList.getParentFObj());
	}
        return m_defaultProp;
	
    }

}
