Bool content_any(elem)

- check if the content model consist of the keyword ANY P_Element elem;

Bool declared_content(elem)

- check if the content model is a declared content P_Element elem;

The function content_any() returns TRUE when the content of elem consist solely of ANY, otherwise FALSE is returned.

The function declared_content() returns TRUE when the content of elem is the keyword CDATA, RCDATA or EMPTY (Standard section 11.2.3, page 40), otherwise FALSE is returned.

void omit_starttag(node, element)

- mark a starttag as optional P_Node node; P_Element element;

The argument `node' represents a generic identifier (GI) which has 3 children: the starttag, the element itself and the endtag. The starttag of this GI is marked optional if the omission of the starttag does not create an ambiguity.

void starttag(node, node_element)

- check if the starttag of a GI is optional and marks it P_Node node; P_Element node_element;

If a node is a generic identifier (GI) the starttag may, in some cases, be omitted. This can only happen when the minimization for the starttag of this element is `O' in the document type definition. If the element corresponding to the GI-name has a declared content or a required attribute the starttag may not be omitted (Standard section 7.3.11 (a)).

When the content of the element is ANY the starttag also may not be omitted because the omission would create an ambiguity. The keyword ANY must be replaced in the document by one of the declared elements. It may even be the element containing ANY.

In all other cases the starttag may be omitted if the element satisfies the conditions specified in the Standard section 7.3.11.

void debug_omitstrt(b)

- used only for debugging Bool b;

The function sets a debug flag to the value of `b'. If the value of `b' is TRUE, all debug information listed in this file is printed, if the value is FALSE, no debug information is printed.

omitstrt.c omitstrt.h