A query interface returning possible fenomens as given by document grammar.
It provides at specified HintContext following information:
- allowed element names and namespaces
- allowed entity names
- allowed notation names
- allowed attribute names
- allowed values of attribute values or element content
This information are returned as Enumeration . Every member of
the enumeration represents one possible option. Empty enumeration signals
that no hint can be derived from grammar in given context.
Every option represents DOM Node that can have children. These children
represents mandatory content for given option. Providing them is optional.
On the other hand EMPTY elements may not provide any children.
Context Representation
Query context is represented by a read-only DOM1 model Core and XML modules
(it may be replaced with DOM2).
Implementation Note:
DOM1 does describe only non-DTD part of document.
Passed context may represent errorous XML document. The code must
take into account that it can get null s even on places
where it does not expect it. E.g. getParentNode() as
the DOM document can be constructed as a best effort one.
Also as the context may originate from a text editor it is better to
rely on getPreviousSibling rather then getNextSibling
as user usaully types text from document begining.
author: Petr Kuzel |