Types for representing a structured document