void init_open_el()

- initialize the stack of open elements

The open elements - i.e. elements of which a starttag has occurred but not yet the corresponding endtag - must be known during parsing. More precise, the order in which the elements where opened must also be known. This information is kept in a stack, with the top member of the stack indicating the most recently opened element. This stack is used for endtag omission and shorttags (see ``startend.c'').

Also a stack is maintained with the active inclusions and exclusions. For every open element the corresponding inclusions and exclusions elements are pushed on that stack.

ElemStack CreateElemStack(null_elem)

- create a stack for open elements int null_elem;

void PushElem(s, e)

- push element e on stack s ElemStack s; int e;

int PopElem(s)

- pop an element off stack s ElemStack s;

int TopElem(s)

- return the top element of stack s ElemStack s;

Bool On_stackElem(s, e)

- check if element e is on stack s ElemStack s; int e;

int Size_elemstack(s)

- return the number of elements on stack s ElemStack s;

See stack.gen for the description of the functions.

elem_stk.c elem_stk.h