Context Translation via External Mapping Files
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
XML document validation errors often lack context-specific information, and existing context translation programs require source code modifications and recompilation to handle different error messages from various validators, which is impractical for end users.
Innovation Solution
A generic context translation program uses a mapping that is not embodied in executable code to translate rule-specific error messages into context-specific messages, allowing modifications without altering the program's source code, using a schema like XML Schema or DTD to determine rule violations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If context translation is hard-coded into the program source code, then the translation accuracy and context-specific information are improved, but the device complexity and difficulty of modification increase
Solution Approach 1:
The patent segments the context translation functionality from the core validator program by using separate mapping files that associate generic error codes with context-specific meanings. This allows the translation mechanism to be modified independently without changing the validator source code, thus reducing device complexity while preserving context-specific information.
Solution Approach 2:
The patent introduces mapping files as an intermediary layer between the generic validator and the user interface. These mapping files contain context-specific information that translates generic error codes into meaningful messages without requiring modifications to the validator program itself, thereby maintaining information quality while simplifying program structure.
2Productivity
If the mapping is embodied in executable code, then the translation speed and program performance are improved, but the ease of operation and modification deteriorate
Solution Approach 1:
The patent implements a dynamic mapping mechanism where context translation rules are stored in external mapping files rather than being hard-coded. This allows the mapping to be modified at runtime or by simply replacing files, providing both fast execution (loading pre-compiled mappings) and ease of modification (editing external files without recompilation).
Solution Approach 2:
The validator program is designed to automatically load and use mapping files without requiring user intervention for code modification. The system serves itself by maintaining separate mapping files that can be updated independently, enabling non-programmers to modify context translations by simply editing external configuration files rather than source code.
3Adaptability or versatility
If different validators output different error messages, then the adaptability to various validation tools is improved, but the loss of information and consistency deteriorate
Solution Approach 1:
The patent creates a universal mapping framework that works with multiple different validators by mapping their diverse error codes to a common set of context-specific meanings. The mapping files contain broad coverage of error types from various validators, enabling consistent context translation across different validation tools while maintaining adaptability to each validator's specific error format.
Data Source
AI summary
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.


