org.apache.crimson.parser
Interface AttributesEx

All Superinterfaces:
org.xml.sax.Attributes
All Known Implementing Classes:
AttributesExImpl

public interface AttributesEx
extends org.xml.sax.Attributes

This interface extends the SAX Attributes interface to expose information needed to support DOM Level 2 features used in document editing, and detection of ID attributes which are declared for an element.

Author:
David Brownell

Method Summary
 String getDefault(int i)
          Returns the default value of the specified attribute, or null if no default value is known.
 String getIdAttributeName()
          Returns the name of the ID attribute for the associated element, if one was declared.
 boolean isSpecified(int i)
          Returns true if the attribute was specified in the document.
 
Methods inherited from interface org.xml.sax.Attributes
getIndex, getIndex, getLength, getLocalName, getQName, getType, getType, getType, getURI, getValue, getValue, getValue
 

Method Detail

isSpecified

public boolean isSpecified(int i)
Returns true if the attribute was specified in the document. This method only relates to document editing; there is no difference in semantics between explicitly specifying values of attributes in a DTD vs another part of the document.

Parameters:
i - the index of the attribute in the list.

getDefault

public String getDefault(int i)
Returns the default value of the specified attribute, or null if no default value is known. Default values may be explicitly specified in documents; in fact, for standalone documents, they must be so specified. If isSpecified is false, the value returned by this method will be what getValue returns.

Parameters:
i - the index of the attribute in the list.

getIdAttributeName

public String getIdAttributeName()
Returns the name of the ID attribute for the associated element, if one was declared. If such an ID value was provided, this name can be inferred from methods in the base class; but if none was provided, this will be the only way this name can be determined.