XML Tools API overview.

Status

Under development. See also API changes document.

Purpose

XML tools API simplifies writing inter-operable modules handling user's XML resources. It also improves consistency of user experience as it introduces minimum standard behavior support for all XML domains.

Supported Use Cases

Actions

XML is general document format that allows to define document structure and semantics. It influences behavior of common user's actions. Particular behavior of such action depends on specifics of defined semantics. This can be modeled in OpenIDE APIs using cookies. XML tools API defines set of common cookies {@link org.netbeans.api.xml.cookies} and support for their providers {@link org.netbeans.spi.xml.cookies}.

A user can take a cookie action from the action pool and put it on a data object serving particular cookie. The action is performed via served cookie that is aware of actual behavioural enhancement for given data object.

User's XML Document Parsing

All standard XML processors APIs define call-back interfaces that must be provided by clients. Further evaluation identifies one type of application wide call-back interface - entity resolution (e.g. in SAX called {@link org.xml.sax.EntityResolver}). XML tools API introduces notion of context user's entity catalog service {@link org.netbeans.api.xml.services.UserCatalog} back-ended by plugged in providers.

A user has all their entity registrations at one place for given context and these are shared by all processors handling user's documents in the context.

Unification&Integration

Standard XML APIs (DOM, TrAX, SAX, OpenIDE) define a API for the same purpose several times to avoid dependencies. {@link org.netbeans.api.xml.parsers} provides classes bridging between them. It also contains utility classes such as DTD parser.

Model

Looking for model and 2-way editing support? We are looking for ideas how to define it!