1. A method performed by a data processing system, comprising: receiving a document having fragments with attribute/value pairs; receiving logical expressions that define relationships between fragments of the document; analyzing the logical expressions to identify fragment names and attributes; creating an index based on the analysis that includes names of the fragments to be candidates for selection into subdocuments; extracting, from the document, all fragments named in the index; creating, in the index, an entry for each attribute/value pair; creating a plurality of subdocuments corresponding to the document; and storing the subdocuments, including the respective related fragments.