Abstract:
An output processor for transforming the output produced by a functional component into different forms that can be consumed and presented by different types of clients is disclosed. With this output processor, a functional component is allowed to produce a single set of output that is not targeted at any particular type of client. The output processor then determines which type of client is requesting the output, and transforms the output into a form that can be consumed and presented by that type of client. By performing this transformation, the output processor allows the implementation of the functional component to be decoupled from the client that is requesting output from the functional component. This decoupling in turn enables the amount of effort needed to develop and maintain functional components in a large scale program to be significantly reduced.
Abstract:
In accordance with one embodiment of the present invention, there is provided a technique for context translation. According to an aspect of the technique, a mapping is consulted. The mapping maps a first message to a second message. The first message comprises a rule-specific error message that indicates one or more rules that were violated by a portion of a document. The second message comprises a context-specific message that sets forth the meaning of the error message in a particular implementation context. The second message is provided as output. Thus, the rule-specific error message is translated into the context-specific message. According to an aspect of the technique, the mapping is not embodied in executable code. As a result, the mapping can be modified without modifying and recompiling the source code of a program that consults the mapping and outputs the second message.