1. A computer implemented method comprising: receiving a markup language document comprising nodes associated with node types and associations between nodes; receiving a specification comprising a mapping from sets of node types to sets of handlers, wherein each set of node types specified in the mapping is mapped to a set of handlers; receiving a request associated with a target node of the markup language document; determining the handler associated with the node based on a context of the node in the markup language document, the context comprising a set of nodes associated with the target node in the markup language document, the determining comprising: identifying a set of node types for the target node and the set of nodes linked to the target node; identifying a set of handlers mapped to the identified set of node types based on the mapping from sets of node types to sets of handlers; and executing a handler from the identified set of handlers responsive to the request.