Working with Document Types and Demand Records