摘要:In this paper we propose a new framework for transformations of XML documents based on an extension of regular expression type, called incomplete regular expression type. Incomplete regular expression type is a restricted second-order extension of regular expression (RE) type: An incomplete RE type can be applied to arbitrary RE types as its arguments. It is accomplished by introducing holes to types. We give a version of second-order rewrite systems, designed founded on our type system. Matching between a subterm with the left-hand side of rewrite rules yields a substitution that bind second-order terms to the variables of incomplete type. This feature is practically useful when we want to reuse “the upper parts” of XML documents in the transformation. We demonstrate that the introduction of incomplete regular expression type allows programmers much flexibility. In this paper, we mainly concentrate on the type theoretic issues and give some properties concerning for incomplete types. We also show the type preservation in rewriting.