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.
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.
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.