The organization of a document collection into meaningful groups is a fundamental issue in document management systems. The grouping can be carried out by performing a comparison among the layout structure of the documents. To this aim, a powerful representation language able to describe the relations among all the document components is necessary. First-Order Logic formul