All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ajax4jsf.framework.renderer.compiler.PlainElementCreateRule Maven / Gradle / Ivy

/**
 * Licensed under the Common Development and Distribution License,
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.sun.com/cddl/
 *   
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package org.ajax4jsf.framework.renderer.compiler;

import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.digester.Rule;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;

/**
 * @author [email protected] (latest modification by $Author: slava_kabanovich $)
 * @version $Revision: 1.2 $ $Date: 2006/07/12 09:45:58 $
 *
 */
public class PlainElementCreateRule extends Rule {

	/* (non-Javadoc)
	 * @see org.apache.commons.digester.Rule#begin(java.lang.String, java.lang.String, org.xml.sax.Attributes)
	 */
	public void begin(String namespace, String name, Attributes attrs) throws Exception {
		if (name.startsWith(HtmlCompiler.NS_PREFIX)) {
			throw new SAXException(Messages.getMessage(Messages.NAMESPACE_NOT_RECOGNIZED_ERROR, name));
		}
		digester.push(new PlainElement(namespace,name,attrs));
	}

	/* (non-Javadoc)
	 * @see org.apache.commons.digester.Rule#body(java.lang.String, java.lang.String, java.lang.String)
	 */
	public void body(String arg0, String arg1, String arg2) throws Exception {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see org.apache.commons.digester.Rule#end(java.lang.String, java.lang.String)
	 */
	public void end(String arg0, String arg1) throws Exception {
		// TODO Auto-generated method stub
		digester.pop();
	}
	
	

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy