|
| | | |
Programming with Heterogeneous Structures: Manipulating XML data Using bondi
Huang, F.Y., Jay, C.B. and Skillicorn, D.B.
Manipulating semistructured data, such as XML, does not fit well within conventional programming languges. A typical manipultion requires finding all occurrences of a structure matching a structured search pattern, whose context may be different in different places, and both aspects cause difficulty, If a special-purpose query language is used to manipulate XML, an interface to a more general programming environment is required, and this interface typically creates runtime overhead for type conversion. However, adding XML manipulation to a general-purpose programming language has proven difficult because of problems associated with expressiveness and typing. We show an alternative approach that handles many kinds of patterns within an existing strongly-typed general-purpose programming languages called bondi. The key ideas are to express complex search patterns as strucutres of simple patterns, pass these complex patterns as parameters to generic data-processing functions and traverse heterogeneous data structures by a generalised form of pattern matching. These ideas are made possible by the language's support for pattern calculus, whose typing on structures and patterns enables path and pattern polymorphism. With this approach, adding a new kind of pattern is just a matter of rogramming, not language design. |
Cite as: Huang, F.Y., Jay, C.B. and Skillicorn, D.B. (2006). Programming with Heterogeneous Structures: Manipulating XML data Using bondi. In Proc. Twenty-Ninth Australasian Computer Science Conference (ACSC 2006), Hobart, Australia. CRPIT, 48. Estivill-Castro, V. and Dobbie, G., Eds. ACS. 287-295. |
(from crpit.com)
(local if available)
|
|