Partitioning the document