String att_name(attdef)

- return attribute name P_Attdef attdef;

int att_declared_value(attdef)

- return attribute declared value P_Attdef attdef;

String* att_range(attdef)

- return attribute range P_Attdef attdef;

int att_default_type(attdef)

- return attribute default type P_Attdef attdef;

String att_default_value(attdef)

- return attribute default value P_Attdef attdef;

String att_current_value(attdef)

- return attribute current value P_Attdef attdef;

All these functions return a property of the attribute definition. During reading the attribute value specification of a starttag, the current value of the corresponding attribute is filled in. It is recalled with attr_current_value().

void att_set_default_value(attdef, def_value)

- set the default value P_Attdef attdef; String def_value;

void att_set_current_value(attdef, cur_value)

- set the current value P_Attdef attdef; String cur_value;

In a document only the current value of an attribute changes, and it is possible to change it with att_set_current_value(). If the attribute is a CURRENT attribute, the current value of the attribute must be saved because the default value will automatically become the most recently specified value. If the attribute is not a CONREF attribute a call to att_set_default_value() is ignored.

P_Att_iter attdef_iterator(attlist)

- iterator for attlist structure P_Attdeflist attlist;

P_Attdef att_iter_next(iter)

- return next attribute definition P_Att_iter *iter;

To visit all the attribute of one attribute specification list one at the time attdef_iterator() is called. It returns an iterator. All attribute definitions are returned by sequential calls to att_iter_next() with this iterator as parameter. The last value returned is zero, this indicates that all the attributes have been visited.

P_Attdef attdef_name_lookup(attlist, att_name)

- return the attribute definition with att_name P_Attdeflist attlist; String att_name;

P_Attdef attdef_value_lookup(attlist, att_value)

- return the attribute definition with att_value P_Attdeflist attlist; String att_value;

If an attribute name is read, the corresponding attribute structure must be found to check the attribute value etc. This is done in procedure attdef_name_lookup(). In basic SGML it is possible to omit the attribute name. Now there is no name but the value must be unique so the corresponding attribute can be found with attdef_value_lookup(). These functions return ILL_ATT if the attribute definition can not be found.

att_par.c att_par.h