摘要:This paper presents an expressive bidirectional XML transformation language and uses it to address the problem of updating XML data through materialized XQuery views. The transformations of this bidirectional language can be executed in two directions: in the forward direction, they generate materialized views from XML source, while in the backward direction, they update the source by reflecting back the updates on views. When XQuery is interpreted with this bidirectional language, it can query XML in its forward execution, and update XML source after its backward execution. We propose the extended round-tripping property for characterizing the good behavior of bidirectional transformations. This property is more flexible for an expressive bidirectional transformation language. The difficulties of updating view insertions are analyzed with detailed examples, and the type information is novelly used to guide backward transformation when views include insertions. A type system with recursive regular expression types for XML is designed for this bidirectional language. Well-typed programs preserve the source type after backward executions. A prototype of our approach is implemented and tested on a number of XQuery use cases.
关键词:Bidirectional programming language bidirectional transformation view update XQuery type system