The attributes are read-write so that subsequent stages in the document pipeline can modify the values or change the attributes that are propogated to the next stage.
com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler#startElement
Modifier and Type | Class and Description |
---|---|
pack-priv static class | XMLAttributesImpl.
Attribute information. |
Modifier and Type | Field and Description |
---|---|
protected XMLAttributesImpl. | fAttributes
Attribute information. |
protected XMLAttributesImpl. | fAttributeTableView
Provides an alternate view of the attribute specification. |
protected int[] | fAttributeTableViewChainState
Tracks whether each chain in the hash table is stale with respect to the current state of this object. |
protected int[] | fHashMultipliers
Array of randomly selected hash function multipliers or |
protected boolean | fIsTableViewConsistent
Indicates whether the table view contains consistent data. |
protected int | fLargeCount
Usage count for the attribute table view. |
protected int | fLength
Attribute count. |
protected boolean | fNamespaces
Namespaces. |
protected int | fTableViewBuckets
Actual number of buckets in the table view. |
protected static final int | MAX_HASH_COLLISIONS
Maximum hash collisions per bucket. |
protected static final int | |
protected static final int | |
protected static final int | SIZE_LIMIT
Threshold at which an instance is treated as a large attribute list. |
protected static final int | TABLE_SIZE
Default table size. |
Access | Constructor and Description |
---|---|
public | |
public |
Modifier and Type | Method and Description |
---|---|
public int | Returns: Returns the attribute index.The attribute name. name, String The attribute type. The type name is determined by
the type specified for this attribute in the DTD.
For example: "CDATA", "ID", "NMTOKEN", etc. However,
attributes of type enumeration will have the type
value specified as the pipe ('|') separated list of
the enumeration values prefixed by an open
parenthesis and suffixed by a close parenthesis.
For example: "(true|false)". type, String The attribute value. value)Implements com. Adds an attribute. |
public int | |
public void | addAttributeNS(QName
the attribute name name, String the attribute type type, String the attribute value value)Adds an attribute. |
public QName | Returns: the name of a duplicate attribute found in the search, otherwise null.Checks for duplicate expanded names (local part and namespace name pairs) in the attribute specification. |
private QName | |
protected void | |
public Augmentations | Returns: AugmentationsThe Namespace URI, or null if the uri, String The local name of the attribute. localName)Implements com. Look up an augmentations by Namespace name. |
public Augmentations | Returns: AugmentationsThe XML 1.0 qualified name. qName)Implements com. Look up an augmentation by XML 1.0 qualified name. |
public Augmentations | Returns: AugmentationsThe attribute index. attributeIndex)Implements com. Look up an augmentations by attributes index. |
public int | Returns: The index of the attribute, or -1 if it does not appear in the list.The qualified (prefixed) name. qName)Implements com. Look up the index of an attribute by XML 1.0 qualified name. |
public int | Returns: The index of the attribute, or -1 if it does not appear in the list.The Namespace URI, or null if
the name has no Namespace URI. uri, String The attribute's local name. localPart)Implements com. Look up the index of an attribute by Namespace name. |
public int | Returns: The index of the attribute, or -1 if it does not appear in the list.The attribute's local name. localPart)Look up the index of an attribute by local name only, ignoring its namespace. |
public int | Returns: The index of the attribute, or -1 if it does not appear in the list.The qualified (prefixed) name. qName)Look up the index of an attribute by XML 1.0 qualified name. |
public int | Returns: The index of the attribute, or -1 if it does not appear in the list.The Namespace URI, or null if
the name has no Namespace URI. uri, String The attribute's local name. localPart)Look up the index of an attribute by Namespace name. |
public int | Returns: The number of attributes in the list.Implements com. Return the number of attributes in the list. |
public String | Returns: The local name, or the empty string if Namespace processing is not being performed, or null if the index is out of range.The attribute index (zero-based). index)Implements com. Look up an attribute's local name by index. |
public void | getName(int
The attribute index. attrIndex, QName The attribute name structure to fill in. attrName)Implements com. Sets the fields in the given QName structure with the values of the attribute name at the specified index. |
public String | Returns: The name of the indexed attribute, or null if the index is out of range.The index of the attribute in the list (starting at 0). index)Return the name of an attribute in this list (by position). |
public String | getNonNormalizedValue(int
The attribute index. attrIndex)Implements com. Returns the non-normalized value of the attribute at the specified index. |
public String | getPrefix(int
The index of the attribute. index)Implements com. Returns the prefix of the attribute at the specified index. |
public String | Returns: The XML 1.0 qualified name, or the empty string if none is available, or null if the index is out of range.The attribute index (zero-based). index)Implements com. Look up an attribute's XML 1.0 qualified name by index. |
public QName | getQualifiedName(int index)
Implements com.
|
private String | Returns: the value passed in or NMTOKEN if it's an enumerated type.attribute type type)Returns the value passed in or NMTOKEN if it's an enumerated type. |
protected int | Returns: the position in the table view where the given attribute would be hashedthe attribute name qname)Returns the position in the table view where the given attribute name would be hashed. |
protected int | Returns: the position in the table view where the given attribute would be hashedthe local part of the attribute localpart, String the namespace name of the attribute uri)Returns the position in the table view where the given attribute name would be hashed. |
public String | Returns: The attribute's type as a string, or null if the index is out of range.The attribute index (zero-based). index)Implements com. Look up an attribute's type by index. |
public String | Returns: The attribute type as a string, or null if the attribute is not in the list or if qualified names are not available.The XML 1.0 qualified name. qname)Implements com. Look up an attribute's type by XML 1.0 qualified name. |
public String | Returns: The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed.The Namespace URI, or null if the
name has no Namespace URI. uri, String The local name of the attribute. localName)Implements com. Look up an attribute's type by Namespace name. |
public String | Returns: The Namespace URIThe attribute index (zero-based). index)Implements com. Look up an attribute's Namespace URI by index. |
public String | Returns: The attribute's value as a string, or null if the index is out of range.The attribute index (zero-based). index)Implements com. Look up an attribute's value by index. |
public String | Returns: The attribute value as a string, or null if the attribute is not in the list or if qualified names are not available.The XML 1.0 qualified name. qname)Implements com. Look up an attribute's value by XML 1.0 qualified name. |
public String | Returns: The attribute value as a string, or null if the attribute is not in the list.The Namespace URI, or null namespaces are ignored. uri, String The local name of the attribute. localName)Implements com. Look up an attribute's value by Namespace name and Local name. |
private void | |
private int | |
private int | |
private int | |
public boolean | isSpecified(int
The attribute index. attrIndex)Implements com. Returns true if the attribute is specified in the instance document. |
protected void | prepareAndPopulateTableView()
Prepares the table view of the attributes list for use, and populates it with the attributes which have been previously read. |
private void | |
private void | |
protected void | |
private void | rebalanceTableView(final int count)
Randomly selects a new hash function and reorganizes the table view in order to more evenly distribute its entries. |
private void | rebalanceTableViewNS(final int count)
Randomly selects a new hash function and reorganizes the table view in order to more evenly distribute its entries. |
public void | refresh()
Implements com. This method will be invoked by XMLEntityReader before ScannedEntities buffer is reloaded. |
public void | refresh(int pos)
Implements com. receives callbacks from |
public void | removeAllAttributes()
Implements com. Removes all of the attributes. |
public void | removeAttributeAt(int
The attribute index. attrIndex)Implements com. Removes the attribute at the specified index. |
public void | setAugmentations(int
The attribute index. attrIndex, Augmentations The augmentations. augs)Implements com. Sets the augmentations of the attribute at the specified index. |
public void | setName(int
The attribute index. attrIndex, QName The new attribute name. attrName)Implements com. Sets the name of the attribute at the specified index. |
public void | setNamespaces(boolean
True if namespace processing is turned on. namespaces)Sets whether namespace processing is being performed. |
public void | setNonNormalizedValue(int
The attribute index. attrIndex, String The new non-normalized attribute value. attrValue)Implements com. Sets the non-normalized value of the attribute at the specified index. |
public void | setSpecified(int
The attribute index. attrIndex, boolean True if the attribute is specified in the instance
document. specified)Implements com. Sets whether an attribute is specified in the instance document or not. |
public void | setType(int
The attribute index. attrIndex, String The attribute type. The type name is determined by
the type specified for this attribute in the DTD.
For example: "CDATA", "ID", "NMTOKEN", etc. However,
attributes of type enumeration will have the type
value specified as the pipe ('|') separated list of
the enumeration values prefixed by an open
parenthesis and suffixed by a close parenthesis.
For example: "(true|false)". attrType)Implements com. Sets the type of the attribute at the specified index. |
public void | |
public void | setValue(int
The attribute index. attrIndex, String The new attribute value. attrValue)Implements com. Sets the value of the attribute at the specified index. |
public void | setValue(int attrIndex, String attrValue, XMLString value)
Implements com.
|
fAttributes | back to summary |
---|---|
protected XMLAttributesImpl. Attribute information. |
fAttributeTableView | back to summary |
---|---|
protected XMLAttributesImpl. Provides an alternate view of the attribute specification. |
fAttributeTableViewChainState | back to summary |
---|---|
protected int[] fAttributeTableViewChainState Tracks whether each chain in the hash table is stale with respect to the current state of this object. A chain is stale if its state is not the same as the number of times the attribute table view has been used. |
fHashMultipliers | back to summary |
---|---|
protected int[] fHashMultipliers Array of randomly selected hash function multipliers or |
fIsTableViewConsistent | back to summary |
---|---|
protected boolean fIsTableViewConsistent Indicates whether the table view contains consistent data. |
fLargeCount | back to summary |
---|---|
protected int fLargeCount Usage count for the attribute table view. Incremented each time all attributes are removed when the attribute table view is in use. |
fLength | back to summary |
---|---|
protected int fLength Attribute count. |
fNamespaces | back to summary |
---|---|
protected boolean fNamespaces Namespaces. |
fTableViewBuckets | back to summary |
---|---|
protected int fTableViewBuckets Actual number of buckets in the table view. |
MAX_HASH_COLLISIONS | back to summary |
---|---|
protected static final int MAX_HASH_COLLISIONS Maximum hash collisions per bucket. |
MULTIPLIERS_MASK | back to summary |
---|---|
protected static final int MULTIPLIERS_MASK |
MULTIPLIERS_SIZE | back to summary |
---|---|
protected static final int MULTIPLIERS_SIZE |
SIZE_LIMIT | back to summary |
---|---|
protected static final int SIZE_LIMIT Threshold at which an instance is treated as a large attribute list. |
TABLE_SIZE | back to summary |
---|---|
protected static final int TABLE_SIZE Default table size. |
XMLAttributesImpl | back to summary |
---|---|
public XMLAttributesImpl() Default constructor. |
XMLAttributesImpl | back to summary |
---|---|
public XMLAttributesImpl(int tableSize)
|
addAttribute | back to summary |
---|---|
public int addAttribute(QName name, String type, String value) Implements com. Adds an attribute. The attribute's non-normalized value of the
attribute will have the same value as the attribute value until
set using the Note If an attribute of the same name already exists, the old values for the attribute are replaced by the new values.
|
addAttribute | back to summary |
---|---|
public int addAttribute(QName name, String type, String value, XMLString valueCache) |
addAttributeNS | back to summary |
---|---|
public void addAttributeNS(QName name, String type, String value) Adds an attribute. The attribute's non-normalized value of the
attribute will have the same value as the attribute value until
set using the
This method differs from Caution If this method is called it should
not be mixed with calls to
|
checkDuplicatesNS | back to summary |
---|---|
public QName checkDuplicatesNS() Checks for duplicate expanded names (local part and namespace name pairs) in the attribute specification. If a duplicate is found its name is returned. This should be called once all the in-scope namespaces for the element enclosing these attributes is known, and after all the attributes have gone through namespace binding.
|
checkManyDuplicatesNS | back to summary |
---|---|
private QName checkManyDuplicatesNS() |
cleanTableView | back to summary |
---|---|
protected void cleanTableView() Purges all elements from the table view. |
getAugmentations | back to summary |
---|---|
public Augmentations getAugmentations(String uri, String localName) Implements com. Look up an augmentations by Namespace name.
|
getAugmentations | back to summary |
---|---|
public Augmentations getAugmentations(String qName) Implements com. Look up an augmentation by XML 1.0 qualified name.
|
getAugmentations | back to summary |
---|---|
public Augmentations getAugmentations(int attributeIndex) Implements com. Look up an augmentations by attributes index.
|
getIndex | back to summary |
---|---|
public int getIndex(String qName) Implements com. Look up the index of an attribute by XML 1.0 qualified name.
|
getIndex | back to summary |
---|---|
public int getIndex(String uri, String localPart) Implements com. Look up the index of an attribute by Namespace name. |
getIndexByLocalName | back to summary |
---|---|
public int getIndexByLocalName(String localPart) Look up the index of an attribute by local name only, ignoring its namespace.
|
getIndexFast | back to summary |
---|---|
public int getIndexFast(String qName) Look up the index of an attribute by XML 1.0 qualified name. Note This method uses reference comparison, and thus should only be used internally. We cannot use this method in any code exposed to users as they may not pass in unique strings.
|
getIndexFast | back to summary |
---|---|
public int getIndexFast(String uri, String localPart) Look up the index of an attribute by Namespace name. Note This method uses reference comparison, and thus should only be used internally. We cannot use this method in any code exposed to users as they may not pass in unique strings. |
getLength | back to summary |
---|---|
public int getLength() Implements com. Return the number of attributes in the list. Once you know the number of attributes, you can iterate through the list.
|
getLocalName | back to summary |
---|---|
public String getLocalName(int index) Implements com. Look up an attribute's local name by index. |
getName | back to summary |
---|---|
public void getName(int attrIndex, QName attrName) Implements com. Sets the fields in the given QName structure with the values of the attribute name at the specified index.
|
getName | back to summary |
---|---|
public String getName(int index) Return the name of an attribute in this list (by position). The names must be unique: the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list. If the attribute name has a namespace prefix, the prefix will still be attached. |
getNonNormalizedValue | back to summary |
---|---|
public String getNonNormalizedValue(int attrIndex) Implements com. Returns the non-normalized value of the attribute at the specified
index. If no non-normalized value is set, this method will return
the same value as the
|
getPrefix | back to summary |
---|---|
public String getPrefix(int index) Implements com. Returns the prefix of the attribute at the specified index.
|
getQName | back to summary |
---|---|
public String getQName(int index) Implements com. Look up an attribute's XML 1.0 qualified name by index. |
getQualifiedName | back to summary |
---|---|
public QName getQualifiedName(int index) Implements com. |
getReportableType | back to summary |
---|---|
private String getReportableType(String type) Returns the value passed in or NMTOKEN if it's an enumerated type. |
getTableViewBucket | back to summary |
---|---|
protected int getTableViewBucket(String qname) Returns the position in the table view where the given attribute name would be hashed.
|
getTableViewBucket | back to summary |
---|---|
protected int getTableViewBucket(String localpart, String uri) Returns the position in the table view where the given attribute name would be hashed. |
getType | back to summary |
---|---|
public String getType(int index) Implements com. Look up an attribute's type by index. The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case). If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization"). For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN". |
getType | back to summary |
---|---|
public String getType(String qname) Implements com. Look up an attribute's type by XML 1.0 qualified name. See |
getType | back to summary |
---|---|
public String getType(String uri, String localName) Implements com. Look up an attribute's type by Namespace name. See |
getURI | back to summary |
---|---|
public String getURI(int index) Implements com. Look up an attribute's Namespace URI by index. |
getValue | back to summary |
---|---|
public String getValue(int index) Implements com. Look up an attribute's value by index. If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string with each token separated by a single space. |
getValue | back to summary |
---|---|
public String getValue(String qname) Implements com. Look up an attribute's value by XML 1.0 qualified name. See |
getValue | back to summary |
---|---|
public String getValue(String uri, String localName) Implements com. Look up an attribute's value by Namespace name and Local name. If Namespace is null, ignore namespace comparison. If Namespace is "", treat the name as having no Namespace URI. See |
growTableView | back to summary |
---|---|
private void growTableView() Increases the capacity of the table view. |
hash | back to summary |
---|---|
private int hash(String localpart) |
hash | back to summary |
---|---|
private int hash(String localpart, String uri) |
hash0 | back to summary |
---|---|
private int hash0(String symbol) |
isSpecified | back to summary |
---|---|
public boolean isSpecified(int attrIndex) Implements com. Returns true if the attribute is specified in the instance document.
|
prepareAndPopulateTableView | back to summary |
---|---|
protected void prepareAndPopulateTableView() Prepares the table view of the attributes list for use, and populates it with the attributes which have been previously read. |
prepareAndPopulateTableView | back to summary |
---|---|
private void prepareAndPopulateTableView(final int count) |
prepareAndPopulateTableViewNS | back to summary |
---|---|
private void prepareAndPopulateTableViewNS(final int count) |
prepareTableView | back to summary |
---|---|
protected void prepareTableView() Prepares the table view of the attributes list for use. |
rebalanceTableView | back to summary |
---|---|
private void rebalanceTableView(final int count) Randomly selects a new hash function and reorganizes the table view in order to more evenly distribute its entries. This method is called automatically when the number of attributes in one bucket exceeds MAX_HASH_COLLISIONS. |
rebalanceTableViewNS | back to summary |
---|---|
private void rebalanceTableViewNS(final int count) Randomly selects a new hash function and reorganizes the table view in order to more evenly distribute its entries. This method is called automatically when the number of attributes in one bucket exceeds MAX_HASH_COLLISIONS. |
refresh | back to summary |
---|---|
public void refresh() Implements com. This method will be invoked by XMLEntityReader before ScannedEntities buffer is reloaded. |
refresh | back to summary |
---|---|
public void refresh(int pos) Implements com. Doc from com. receives callbacks from |
removeAllAttributes | back to summary |
---|---|
public void removeAllAttributes() Implements com. Removes all of the attributes. This method will also remove all entities associated to the attributes. |
removeAttributeAt | back to summary |
---|---|
public void removeAttributeAt(int attrIndex) Implements com. Removes the attribute at the specified index. Note This operation changes the indexes of all attributes following the attribute at the specified index.
|
setAugmentations | back to summary |
---|---|
public void setAugmentations(int attrIndex, Augmentations augs) Implements com. Sets the augmentations of the attribute at the specified index.
|
setName | back to summary |
---|---|
public void setName(int attrIndex, QName attrName) Implements com. Sets the name of the attribute at the specified index.
|
setNamespaces | back to summary |
---|---|
public void setNamespaces(boolean namespaces) Sets whether namespace processing is being performed. This state is needed to return the correct value from the getLocalName method.
|
setNonNormalizedValue | back to summary |
---|---|
public void setNonNormalizedValue(int attrIndex, String attrValue) Implements com. Sets the non-normalized value of the attribute at the specified index.
|
setSpecified | back to summary |
---|---|
public void setSpecified(int attrIndex, boolean specified) Implements com. Sets whether an attribute is specified in the instance document or not.
|
setType | back to summary |
---|---|
public void setType(int attrIndex, String attrType) Implements com. Sets the type of the attribute at the specified index.
|
setURI | back to summary |
---|---|
public void setURI(int attrIndex, String uri) Sets the uri of the attribute at the specified index.
|
setValue | back to summary |
---|---|
public void setValue(int attrIndex, String attrValue) Implements com. Sets the value of the attribute at the specified index. This method will overwrite the non-normalized value of the attribute.
|
setValue | back to summary |
---|---|
public void setValue(int attrIndex, String attrValue, XMLString value) Implements com. |
Modifier and Type | Field and Description |
---|---|
public Augmentations | augs
Augmentations information for this attribute. |
public final QName | name
Name. |
public XMLAttributesImpl. | next
Pointer to the next attribute in the chain. |
public String | nonNormalizedValue
Non-normalized value. |
public boolean | specified
Specified. |
public String | type
Type. |
public String | value
Value. |
public XMLString | xmlValue
This will point to the ScannedEntities buffer. |
Access | Constructor and Description |
---|---|
pack-priv |
augs | back to summary |
---|---|
public Augmentations augs Augmentations information for this attribute. XMLAttributes has no knowledge if any augmentations were attached to Augmentations. |
name | back to summary |
---|---|
public final QName name Name. |
next | back to summary |
---|---|
public XMLAttributesImpl. Pointer to the next attribute in the chain. |
nonNormalizedValue | back to summary |
---|---|
public String nonNormalizedValue Non-normalized value. |
specified | back to summary |
---|---|
public boolean specified Specified. |
type | back to summary |
---|---|
public String type Type. |
value | back to summary |
---|---|
public String value Value. |
xmlValue | back to summary |
---|---|
public XMLString xmlValue This will point to the ScannedEntities buffer. |
Attribute | back to summary |
---|---|
pack-priv Attribute() |