Abstract. We consider documents as words and trees on some alphabet and study how to compare them with some regular schemas on an alphabet . Given an input document I, we decide if it may be transformed into a document J which is -close to some target schema T: we show that this approximate decision problem can be efficiently solved. In the simple case where the transformation is the identity, we describe an approximate algorithm which decides if I is close to a target regular schema (DTD). This property is testable, i.e. can be solved in time independent of the size of the input document, by just sampling I. In the general case, the Structural Consistency decides if there is a transducer T with at most m states such that I is -close to I and his image T (I ) is both close to T and of size comparable to the size of I. We show that Structural Consistency is also testable, i.e. can be solved by sampling I.