1. An information processing apparatus for encoding a structured document into an encoded document, comprising: at least one processor operable to function as: a storage unit that stores, into an encoding table, a portion of a schema describing an object included in the structured document as a vocabulary together with a first code, the portion of the schema defining at least a plurality of data types for a plurality of variables; a verification unit that compares a grammar of a part of the structured document to a grammar of the portion of the schema in the encoding table and verifies that the grammar of the part of the structured document matches the grammar of the portion of the schema in the encoding table; and an encoding unit that encodes the structured document by assigning the first code for the part of the structured document and by assigning a second code for a plurality of variables associated with the part of the structured document according to the plurality of data types.
7. The information processing apparatus according to claim 1 , wherein the storage unit determines whether the grammar of the portion of the schema appears repeatedly in the structured document, and wherein the storage unit stores, into the encoding table, the portion of the schema describing the object included in the structured document as the vocabulary together with the first code, if the storage unit determines that the portion of the schema appears repeatedly in the structured document.