XML structure editors can use this information
to constrain the choices presented to document
authors so that only valid documents can be created.
Other tools that construct documents will also benefit
from having this information.
When you're mostly reading documents rather than
creating them, the most important data here tends to
be declaration of ID,
IDREF, and IDREFS
attributes, which are
used to build links within and between XML
documents.
If more than one declaration for an attribute
is provided, only the first one will be used.
(The second one will be ignored;
unlike the analogous case for element declarations,
attribute redeclaration is not a validity error.)
Normally code to implement this callback would
first retrieve any existing per-element data
structure, or it would create one
(with a null content model)
if none is yet known.
Then if there is no record of an attribute with this
name for that element, a per-attribute data structure
instance would be created and saved in the element
data structure, keyed by attribute name.