Algorithmic inferencing of XML Schema definitions and Document Type Definitions