Notes
about thread-safety: this class is not thread-safe, since it does not have to be, in general case. That is, the only instances that can be shared are external subset instances, and those are used in read-only manner (with the exception of temporary arrays constructed on-demand).
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv boolean | mAnyDefaults
Flag set to true if there are any attributes that have either basic default value, or #FIXED default value. |
| pack-priv boolean | |
| pack-priv HashMap | |
| pack-priv DTDAttribute | mIdAttr
Id attribute instance, if one already declared for this element; can only have up to one such attribute per element. |
| pack-priv final Location | mLocation
Location of the (real) definition of the element; may be null for placeholder elements created to hold ATTLIST definitions |
| pack-priv final PrefixedName | |
| pack-priv DTDAttribute | mNotationAttr
Notation attribute instance, if one already declared for this element; can only have up to one such attribute per element. |
| pack-priv final boolean | mNsAware
True if the DTD was parsed (and is to be used) in namespace-aware mode. |
| pack-priv HashMap | mNsDefaults
Set of namespace declarations with default values, if any (regular ns pseudo-attr declarations are just ignored) |
| pack-priv ArrayList | mSpecAttrList
Ordered list of attributes that have 'special' properties (attribute is required, has a default value [regular or fixed]); these attributes have to be specifically checked after actual values have been resolved. |
| pack-priv boolean | mValidateAttrs
Flag that is set to true if there is at least one attribute that has type that requires normalization and/or validation; that is, is of some other type than CDATA. |
| pack-priv StructValidator | mValidator
Base validator object for validating content model of this element; may be null for some simple content models (ANY, EMPTY). |
| pack-priv final boolean | mXml11
True if the DTD was parsed in xml1.1 compliant mode (referenced to from an xml 1.1 document). |
| Access | Constructor and Description |
|---|---|
| private | DTDElement(Location loc, PrefixedName name, StructValidator val, int allowedContent, boolean nsAware, boolean xml11)
|
| Modifier and Type | Method and Description |
|---|---|
| public DTDAttribute | Returns: Newly created attribute Object if the attribute definition was added (hadn't been declared yet); null if it's a duplicate, in which case original definition sticks.Method called by DTD parser when it has read information about an attribute that belong to this element |
| public DTDAttribute | Returns: Attribute that acts as the placeholder, if the declaration was added; null to indicate it was a dup (there was an earlier declaration)Reporter to use to report non-fatal problems rep, PrefixedName attrName, int valueType, DefaultAttrValue defValue, boolean Whether this is being invoked for actual DTD validation,
or just the "typing non-validator" fullyValidate)Method called to add a definition of a namespace-declaration pseudo-attribute with a default value. |
| public boolean | Returns: True if at least one of the attributes has type other than CDATA; false if not
|
| public static DTDElement | createDefined(ReaderConfig cfg, Location loc, PrefixedName name, StructValidator val, int allowedContent)
Method called to create an actual element definition, matching an ELEMENT directive in a DTD subset. |
| public static DTDElement | createPlaceholder(ReaderConfig cfg, Location loc, PrefixedName name)
Method called to create a "placeholder" element definition, needed to contain attribute definitions. |
| public DTDElement | define(Location loc, StructValidator val, int allowedContent)
Method called on placeholder element, to create a real instance that has all attribute definitions placeholder had (it'll always have at least one -- otherwise no placeholder was needed). |
| public void | defineFrom(InputProblemReporter rep, DTDElement definedElem, boolean fullyValidate)
Method called to "upgrade" a placeholder using a defined element, including adding attributes. |
| private DTDAttribute | Returns: Earlier declaration of the attribute, if any; null if this was a new attribute
|
| public int | Returns: Constant that identifies what kind of nodes are in general allowed inside this element.
|
| public int | getAllowedContentIfSpace()
Specialized accessor used by non-validating but typing 'validator': essentially, used to figure out whether #PCDATA is allowed or not; and based on that, return one of 2 allowable text values (only space, or anything). |
| public HashMap | |
| public String | |
| public DTDAttribute | |
| public Location | |
| public PrefixedName | |
| public DTDAttribute | |
| protected HashMap | |
| public List | |
| public int | |
| private List | |
| public StructValidator | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public String | |
| private void |
| mAllowedContent | back to summary |
|---|---|
| pack-priv int mAllowedContent | |
| mAnyDefaults | back to summary |
|---|---|
| pack-priv boolean mAnyDefaults Flag set to true if there are any attributes that have either basic default value, or #FIXED default value. | |
| mAnyFixed | back to summary |
|---|---|
| pack-priv boolean mAnyFixed | |
| mAttrMap | back to summary |
|---|---|
| pack-priv HashMap<PrefixedName, DTDAttribute> mAttrMap | |
| mIdAttr | back to summary |
|---|---|
| pack-priv DTDAttribute mIdAttr Id attribute instance, if one already declared for this element; can only have up to one such attribute per element. | |
| mLocation | back to summary |
|---|---|
| pack-priv final Location mLocation Location of the (real) definition of the element; may be null for placeholder elements created to hold ATTLIST definitions | |
| mName | back to summary |
|---|---|
| pack-priv final PrefixedName mName | |
| mNotationAttr | back to summary |
|---|---|
| pack-priv DTDAttribute mNotationAttr Notation attribute instance, if one already declared for this element; can only have up to one such attribute per element. | |
| mNsAware | back to summary |
|---|---|
| pack-priv final boolean mNsAware True if the DTD was parsed (and is to be used) in namespace-aware mode. Affects (name) validation amongst other things. | |
| mNsDefaults | back to summary |
|---|---|
| pack-priv HashMap<String, DTDAttribute> mNsDefaults Set of namespace declarations with default values, if any (regular ns pseudo-attr declarations are just ignored) | |
| mSpecAttrList | back to summary |
|---|---|
| pack-priv ArrayList<DTDAttribute> mSpecAttrList Ordered list of attributes that have 'special' properties (attribute is required, has a default value [regular or fixed]); these attributes have to be specifically checked after actual values have been resolved. | |
| mValidateAttrs | back to summary |
|---|---|
| pack-priv boolean mValidateAttrs Flag that is set to true if there is at least one attribute that has type that requires normalization and/or validation; that is, is of some other type than CDATA. | |
| mValidator | back to summary |
|---|---|
| pack-priv StructValidator mValidator Base validator object for validating content model of this element; may be null for some simple content models (ANY, EMPTY). | |
| mXml11 | back to summary |
|---|---|
| pack-priv final boolean mXml11 True if the DTD was parsed in xml1.1 compliant mode (referenced to from an xml 1.1 document). Affects (name) validation amongst other things. | |
| DTDElement | back to summary |
|---|---|
| private DTDElement(Location loc, PrefixedName name, StructValidator val, int allowedContent, boolean nsAware, boolean xml11) | |
| addAttribute | back to summary |
|---|---|
| public DTDAttribute addAttribute(InputProblemReporter rep, PrefixedName attrName, int valueType, DefaultAttrValue defValue, WordResolver enumValues, boolean fullyValidate) throws XMLStreamException Method called by DTD parser when it has read information about an attribute that belong to this element
| |
| addNsDefault | back to summary |
|---|---|
| public DTDAttribute addNsDefault(InputProblemReporter rep, PrefixedName attrName, int valueType, DefaultAttrValue defValue, boolean fullyValidate) throws XMLStreamException Method called to add a definition of a namespace-declaration pseudo-attribute with a default value.
| |
| attrsNeedValidation | back to summary |
|---|---|
public boolean attrsNeedValidation()
| |
| createDefined | back to summary |
|---|---|
| public static DTDElement createDefined(ReaderConfig cfg, Location loc, PrefixedName name, StructValidator val, int allowedContent) Method called to create an actual element definition, matching an ELEMENT directive in a DTD subset. | |
| createPlaceholder | back to summary |
|---|---|
| public static DTDElement createPlaceholder(ReaderConfig cfg, Location loc, PrefixedName name) Method called to create a "placeholder" element definition, needed to contain attribute definitions. | |
| define | back to summary |
|---|---|
| public DTDElement define(Location loc, StructValidator val, int allowedContent) Method called on placeholder element, to create a real instance that has all attribute definitions placeholder had (it'll always have at least one -- otherwise no placeholder was needed). | |
| defineFrom | back to summary |
|---|---|
| public void defineFrom(InputProblemReporter rep, DTDElement definedElem, boolean fullyValidate) throws XMLStreamException Method called to "upgrade" a placeholder using a defined element, including adding attributes. | |
| doAddAttribute | back to summary |
|---|---|
private DTDAttribute doAddAttribute(Map<PrefixedName, DTDAttribute> attrMap, InputProblemReporter rep, DTDAttribute attr, List<DTDAttribute> specList, boolean fullyValidate) throws XMLStreamException
| |
| getAllowedContent | back to summary |
|---|---|
public int getAllowedContent()
| |
| getAllowedContentIfSpace | back to summary |
|---|---|
| public int getAllowedContentIfSpace() Specialized accessor used by non-validating but typing 'validator': essentially, used to figure out whether #PCDATA is allowed or not; and based on that, return one of 2 allowable text values (only space, or anything). This is the relevant subset in non-validating modes, needed to properly type resulting character events. | |
| getAttributes | back to summary |
|---|---|
| public HashMap | |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName() | |
| getIdAttribute | back to summary |
|---|---|
| public DTDAttribute getIdAttribute() | |
| getLocation | back to summary |
|---|---|
| public Location getLocation() | |
| getName | back to summary |
|---|---|
| public PrefixedName getName() | |
| getNotationAttribute | back to summary |
|---|---|
| public DTDAttribute getNotationAttribute() | |
| getNsDefaults | back to summary |
|---|---|
| protected HashMap | |
| getSpecialAttrs | back to summary |
|---|---|
| public List | |
| getSpecialCount | back to summary |
|---|---|
| public int getSpecialCount() | |
| getSpecialList | back to summary |
|---|---|
| private List | |
| getValidator | back to summary |
|---|---|
| public StructValidator getValidator() | |
| hasAttrDefaultValues | back to summary |
|---|---|
| public boolean hasAttrDefaultValues() | |
| hasFixedAttrs | back to summary |
|---|---|
| public boolean hasFixedAttrs() | |
| hasNsDefaults | back to summary |
|---|---|
| public boolean hasNsDefaults() | |
| isDefined | back to summary |
|---|---|
| public boolean isDefined() | |
| mergeMissingAttributesFrom | back to summary |
|---|---|
| public void mergeMissingAttributesFrom(InputProblemReporter rep, DTDElement other, boolean fullyValidate) throws XMLStreamException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| verifyUndefined | back to summary |
|---|---|
| private void verifyUndefined() | |