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

org.attoparser.ParseStatus Maven / Gradle / Ivy

There is a newer version: 2.0.7.RELEASE
Show newest version
/*
 * =============================================================================
 * 
 *   Copyright (c) 2012-2014, The ATTOPARSER team (http://www.attoparser.org)
 * 
 *   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.attoparser;



/**
 * 

* Class used for reporting the status of current parsing operations to handlers. *

*

* Instances of this class operate at a very low level, and are only useful in very specific scenarios, * so most {@link org.attoparser.IMarkupHandler} implementations should just ignore its existence and * consider it only for internal use. *

* * @author Daniel Fernández * * @since 2.0.0 * */ public final class ParseStatus { int offset; int line; int col; boolean inStructure; boolean shouldDisableParsing; // This is meant to be modified only inside CDATA elements (disabling can depend on an attribute) boolean parsingDisabled; char[] parsingDisabledLimitSequence; boolean avoidStacking; // These attributes instruct the event processor to make sure an element is correctly stacked inside the elements // it needs to. For example, a element will ask for the auto-opening of a element as its // parent, but it will specify as limits also and because these two elements are also valid // parents for it (just not default). // The limits array will be used for specifying: if not null, the IMMEDIATE parents that will be considered // valid. If not null, that the parent element sequence should only be considered from the document root, and // that it should be completed if something is missing (e.g. there is but no ). // When in HTML, the auto-open elements will be: // // * // RULE: if (parent != && parent != && parent != ) -> AUTO-OPEN // PARENTS: (tbody) LIMITS: (tbody,tfoot,thead) // // * // RULE: if (parent != ) -> AUTO-OPEN // PARENTS: (colgroup) LIMITS: (colgroup) // // * , ,