1. A method of coding or decoding a structured document, the method comprising: (i) configuring an encoder or decoder including obtaining data describing a plurality of items of a document structure model and storing the data as a plurality of recordings to be used by the encoder or decoder for coding or decoding a plurality of corresponding items of a structured document, wherein each of the recordings is associated with a different one of the items of the document structure model and includes, for each said different item of the document structure model: minimum and maximum numbers of occurrences of said different item, and a number of possible types of item liable to occur after one of the occurrences of said different item, said number being calculated according to the document structure model, and wherein the recordings are stored in an order of appearance of associated items within the data describing the document structure model; and (ii) determining a possible item able to succeed a given item that is furthest away from the given item in the order of appearance within the data describing the document structure model, and for an item following the given item, the number of possible types of item is calculated based on a number of items separating the item following the given item and the possible item that is furthest away from the given item.