Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.InsertableElement

    java.lang.Object
        |
        +----com.ibm.xml.parser.InsertableElement

public class InsertableElement
extends java.lang.Object

InsertableElements are hash table entries used by the DTD class in order to determine what kind of Element you can insert into a given index of a given Element Node according to the document grammar specified by a given DTD's internal and external subset.

Refer to DTD#getInsertableElements for usage details.

Version:
  1.1
See Also:
  getInsertableElements(com.ibm.xml.parser.Element, int, java.util.Hashtable)

Field Summary
int | index When this InsertableElement's name is `DTD.CMERROR`, this variable indicates the 0-based index of the offending Child Node of the specified Element Node.
java.lang.String | name A DTD element definition name or one of the XML4J-internal names that are used to track the state of the InsertableElement or AppendableElement hash table: Element name When this InsertableElement's status `=true`, this Element name may be inserted or appended; otherwise, this Element name may not be inserted or appended to the specified Element Node. `DTD.CM_PCDATA` When this InsertableElement's status `=true`, a TXText Node may be inserted or appended; otherwise, a TXText node may not be inserted or appended to the specified Element Node. `DTD.CM_ERROR` If this InsertableElement's status `=true`, the index variable will denote the 0-based index of the first incorrect Child Node of the specified Element Node; if this InsertableElement's status `=false`, no error has been detected. `DTD.CM_EOC` If this InsertableElement's status `=true`, the specified Element Node has correct and complete contents.
boolean | status The meaning of this variable depends on this InsertableElement's name: Element name Whether Element name may be inserted or appended to the specified Element Node. `DTD.CM_PCDATA` Whether a TXText node may be inserted or appended to the specified Element Node. `DTD.CM_ERROR` Whether an error has been detected in parsing the children of the specified Element Node. `DTD.CM_EOC` Whether correct and complete contents have been determined for the specified Element Node.

Constructor Summary
InsertableElement(java.lang.String name) Constructor.
InsertableElement(java.lang.String name, boolean status) Constructor.
InsertableElement(int index) Constructor for `DTD.CM_ERROR` InsertableElements.

Method Summary
java.lang.String | toString() Returns this InsertableElement in XML format.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

### name

    public java.lang.String name

  A DTD element definition name or one of the XML4J-internal names that are used to track the state of the InsertableElement or AppendableElement hash table:
  Element name
    When this InsertableElement's status `=true`, this Element name may be inserted or appended; otherwise, this Element name may not be inserted or appended to the specified Element Node.
  `DTD.CM_PCDATA`
    When this InsertableElement's status `=true`, a TXText Node may be inserted or appended; otherwise, a TXText node may not be inserted or appended to the specified Element Node.
  `DTD.CM_ERROR`
    If this InsertableElement's status `=true`, the index variable will denote the 0-based index of the first incorrect Child Node of the specified Element Node; if this InsertableElement's status `=false`, no error has been detected.
  `DTD.CM_EOC`
    If this InsertableElement's status `=true`, the specified Element Node has correct and complete contents.

### status

    public boolean status

  The meaning of this variable depends on this InsertableElement's name:
  Element name
    Whether Element name may be inserted or appended to the specified Element Node.
  `DTD.CM_PCDATA`
    Whether a TXText node may be inserted or appended to the specified Element Node.
  `DTD.CM_ERROR`
    Whether an error has been detected in parsing the children of the specified Element Node.
  `DTD.CM_EOC`
    Whether correct and complete contents have been determined for the specified Element Node.

### index

    public int index

  When this InsertableElement's name is `DTD.CMERROR`, this variable indicates the 0-based index of the offending Child Node of the specified Element Node. This variable has no meaning for other InsertableElement names.

Constructor Detail

### InsertableElement

    public InsertableElement(java.lang.String name)

  Constructor.
  Parameters:
    `name` - Name of this InsertableElement (see variable description).

### InsertableElement

    public InsertableElement(java.lang.String name,
                             boolean status)

  Constructor.
  Parameters:
    `name` - Name of this InsertableElement (see variable description).
    `status` - Status of this InsertableELement (see variable description).

### InsertableElement

    public InsertableElement(int index)

  Constructor for `DTD.CM_ERROR` InsertableElements.
  Parameters:
    `index` - 0-based index of offending Child Node.

Method Detail

### toString

    public java.lang.String toString()

  Returns this InsertableElement in XML format. For example: "`InsertableElement["elementName", true]`", and "`InsertableElement["elementName", true, 0]`".
  Returns:
    The string representation of this InsertableElement.
  Overrides:
    toString in class java.lang.Object

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |