NetBeans XML tools services implementation guidelines.

## XML Tools Services SPIs

### Services and Settings

A service should not fully control its settings. The setting should be separated (possibly standartized) and located by the service using run-time invocation context. Context sensitive services must express their contextuality in API allowing clients to pass the invocation context to them.

#### Global Service API Example

    public interface XMLService extends EntityResolver {
      // inherited from EntityResolver
      // InputSource resolveEntity(String publicId, String systemId);
    }

#### Context Sensitive Service API Example

    public interface CtxXMLService {
      InputSource resolveEntity(Lookup ctx, String publicId, String systemId);
    }

Also factoring approach can be used:

    public interface CtxService {
      XMLServiceWith30Methods getXMLService(Lookup ctx);
    }

### Statefull Contextual Services

Some contextual services are statefull. In such case implementor must properly handle state per individual context. For example such service can store its state in context if apply.

### Global Context

How should we handle `null` contexts? Treat them as global (for settings).