1. A computer-readable medium having computer-executable instructions, when executed by a computer configured to: receive an input schema, the input schema specifying how to represent one or more elements in a document; receive one or more instance documents; generate one or more rules from the one or more instance documents; analyze the input schema for conformance to the one or more rules; and if the input schema does not conform to the one or more rules, generate a modified schema based on the input schema, the modified schema specifying how to represent the one or more elements in the document in conformance with the one or more rules.