Class AttributeChecks

java.lang.Object
eu.bandm.tools.dtm.AttributeChecks
Direct Known Subclasses:
AttributeChecks_valueTemplates

public class AttributeChecks extends Object
Sorts all attribute NamespaceName from the SAX event attributes part and from the DTM defintion into the appropriate diagnosis set ok, missing, violateType, violateFixed, undeclared), according to the type check results.
"check()" should be called for a particular SAX event with a fresh instance.
By explicitly calling sendErrorMessages_Undecl_Type_Fixed(MessageReceiver), all undeclared, type-violating and fixed-violating attributes are reported to the message channel with the given location Missing attributes are not, but must be treated explicitly by the caller.
The location information in theses error messages is (opaquely) the one supplied on creation, because in SAX contexts it comes with only coarse granular anyhow.
This is separated from the check(), because in the meantime in particular contexts attribute errors can be healed (cf xslt "attribute value templates", "use-attribute-set" attribute, etc.)
// OLD The "ignore" set is introduced for the "use-attribute-set" attribute (and some more) from xsl. FIXME nötig !? besser einfach nach UNDEF, dann wieder raus !?!
TDOM has its own checks, compiled into the constructor code, but these are not so complete (currently eg. undeclared atts are not recognized),
ATTENTION: Attributes of type ID IDREF IDREFS ENTITY ENTITIES and NOTATION must follow the "name" production, see XML section 3.3.1.
Attributes of type NMTOKEN, NMTOKENS and ENUMERATION need only follow the nmtoken production.
A name is an nmtoken which STARTS with an alphabetic character or underscore "_" or colon ":". An NMTOKEN may additionally start with "." or "-" or a digit.