Patent ID: 7620641

Claim:
A method for context-sensitive decomposition of a markup based document into a relational database executing on a processor and memory, based on schemas with reusable item declarations, comprising: creating a mapping document from an annotated Extensible Markup Language (XML) schema that describes a plurality of XML documents, the annotated XML schema comprising: at least one reusable item declaration, wherein a reusable item declaration is an XML schema item that can be used at two or more unique locations in the XML schema; at least one of the reusable item declarations, having at least one mapping annotation, each mapping annotation comprising: a table/column pair specifying a table/column in the relational database where an item associated with the reusable item declaration is stored during decomposition; and a location path specifying the ancestry of the reusable item declaration and uniquely identifying the reusable item declaration; for each reusable item declaration: determining the ancestry of the reusable item declaration; and annotating the mapping document with the table/column pair that corresponds to the location path in the mapping annotation in response to the location path matching the ancestry of the reusable item declaration being mapped; and decomposing each said reusable item declaration into a corresponding database table column specified by the mapping annotation in the mapping document.