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

org.esigate.esi.RemoveElement Maven / Gradle / Ivy

There is a newer version: 5.3
Show newest version
/* 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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.esigate.esi;

import org.esigate.parser.ElementType;
import org.esigate.parser.ParserContext;

/**
 * 

* The remove element allows for specification of non-ESI markup for output if ESI processing is not enabled. If for * some reason ESI processing is not enabled, all of the elements will be passed through to clients, which will ignore * markup it doesn't understand. *

* *

* For example: *

* *
 * <esi:include src="http://www.example.com/ad.html"/> 
 * <esi:remove> 
 *   <a href="http://www.example.com">www.example.com</a>
 * </esi:remove>
 * 
* *

* Normally, when this block is processed, the ESI Processor fetches the ad.html resource and includes it in the * template while silently discarding the remove element and its contents. *

* *

* With Web clients, this works because browsers ignore invalid HTML, such as <esi:...> and</esi:...> * elements, leaving the HTML a element and its content. *

* *

* The remove statement cannot include nested ESI markup. *

* * @author Francois-Xavier Bonnet * @see ESI Language Specification 1.0 * */ class RemoveElement extends BaseElement { public static final ElementType TYPE = new BaseElementType("




© 2015 - 2025 Weber Informatics LLC | Privacy Policy