Results 1 - 10
of
31
Regular Expression Types for XML
, 2003
"... We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (|), etc., to describe XML documents. The novelty of our type sy ..."
Abstract
-
Cited by 157 (18 self)
- Add to MetaCart
We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (|), etc., to describe XML documents. The novelty of our type system is a semantic presentation of subtyping, as inclusion between the sets of documents denoted by two types. We give several examples illustrating the usefulness of this form of subtyping in XML processing. The decision problem for the subtype relation reduces to the inclusion problem between tree automata, which is known to be exptime-complete. To avoid this high complexity in typical cases, we develop a practical algorithm that, unlike classical algorithms based on determinization of tree automata, checks the inclusion relation by a top-down traversal of the original type expressions. The main advantage of this algorithm is that it can exploit the property that type expressions being compared often share portions of their representations. Our algorithm is a variant of Aiken and Murphy’s set-inclusion constraint solver, to which are added several new implementation techniques, correctness proofs, and preliminary performance measurements on some small programs in the domain of typed XML processing.
A typed representation for HTML and XML documents in Haskell
- Journal of Functional Programming
, 2001
"... We define a family of embedded domain specific languages for generating HTML and XML documents in Haskell. To this end, we have designed and implemented a combinator library which provides the means to create and modify HTML/XML elements. The resulting HTML/XML code is guaranteed to be well-formed. ..."
Abstract
-
Cited by 37 (0 self)
- Add to MetaCart
We define a family of embedded domain specific languages for generating HTML and XML documents in Haskell. To this end, we have designed and implemented a combinator library which provides the means to create and modify HTML/XML elements. The resulting HTML/XML code is guaranteed to be well-formed. In addition, the library can guarantee that the generated documents are valid XML documents (for HTML only a weaker guarantee is possible). Haskell can then be used as a meta language to define parameterized documents, to map structured documents to HTML/XML, to define conditional content, to extract information from the documents, or to define entire web sites. The combinators support a programing convention called container-passing style. Programs written in this style have a visual appearance similar to HTML/XML source code, without modifying the syntax of Haskell.
The Design Space of Type Checkers for XML Transformation Languages
, 2004
"... We survey work on statically type checking XML transformations, covering a wide range of notations and ambitions. The concept of type may vary from idealizations of DTD to full-blown XML Schema or even more expressive formalisms. The notion of transformation may vary from clean and simple transd ..."
Abstract
-
Cited by 32 (5 self)
- Add to MetaCart
We survey work on statically type checking XML transformations, covering a wide range of notations and ambitions. The concept of type may vary from idealizations of DTD to full-blown XML Schema or even more expressive formalisms. The notion of transformation may vary from clean and simple transductions to domain-specific languages or integration of XML in general-purpose programming languages. Type annotations can be either explicit or implicit, and type checking ranges from exact decidability to pragmatic approximations. We characterize
Generic Haskell: applications
- In Generic Programming, Advanced Lectures, volume 2793 of LNCS
, 2003
"... Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes discuss three advanced generic programming applications: generic dictionaries, compressing XML documents, and the zipper: a data structure used to represent a tree together with a s ..."
Abstract
-
Cited by 28 (15 self)
- Add to MetaCart
Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes discuss three advanced generic programming applications: generic dictionaries, compressing XML documents, and the zipper: a data structure used to represent a tree together with a subtree that is the focus of attention, where that focus may move left, right, up or down the tree. When describing and implementing these examples, we will encounter some advanced features of Generic Haskell, such as type-indexed data types, dependencies between and generic abstractions of generic functions, adjusting a generic function using a default case, and generic functions with a special case for a particular constructor.
A Programmable Editor for Developing Structured Documents Based on Bidirectional Transformations
- In Partial Evaluation and Program Manipulation (PEPM
, 2004
"... This paper presents a novel editor supporting interactive refinement in the development of structured documents. The user performs a sequence of editing operations on the document view, and the editor automatically derives an efficient and reliable document source and a transformation that produces ..."
Abstract
-
Cited by 25 (12 self)
- Add to MetaCart
This paper presents a novel editor supporting interactive refinement in the development of structured documents. The user performs a sequence of editing operations on the document view, and the editor automatically derives an efficient and reliable document source and a transformation that produces the document view. The editor is unique in its programmability, in the sense that transformation can be obtained through editing operations. The main tricks behind are the utilization of the view-updating technique developed in the database community, and a new bidirectional transformation language that cannot only describe the relationship between the document source and its view, but also data dependency in the view.
Language Independent Traversals for Program Transformation
- Universiteit Utrecht
, 2000
"... syntax representation in which variables are not leaves and extraction of variable names from expressions. strategies free-vars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collect-kids(x), boundvars <+ ![]); diff); union) Figure 15: Algorithm for collecting free variables that tak ..."
Abstract
-
Cited by 24 (7 self)
- Add to MetaCart
syntax representation in which variables are not leaves and extraction of variable names from expressions. strategies free-vars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collect-kids(x), boundvars <+ ![]); diff); union) Figure 15: Algorithm for collecting free variables that takes variables in subterms of variables into account. A variant of this algorithm taking into account binding positions can be created analogously to Figure 13 11 Section: Case Studies RENAMING BOUND VARIABLES Renaming of bound variables depends on the shape of variables and the shape of binding constructs. For binding constructs, in addition to determining what variables are bound and in which arguments they are binding, it is necessary to declare where new variables should be pasted. In order to keep track of renamings it is also required to distribute an environment along with the renaming traversal. Renaming of bound variables is used to prevent name clashes between variables, for exa...
Parametric Polymorphism for XML
, 2004
"... Although several type systems have been investigated for XML, parametric polymorphism is rarely treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric schemas," i.e., schemas parameterized over other schemas (e.g., SOA ..."
Abstract
-
Cited by 23 (3 self)
- Add to MetaCart
Although several type systems have been investigated for XML, parametric polymorphism is rarely treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric schemas," i.e., schemas parameterized over other schemas (e.g., SOAP). The
Modeling HTML in Haskell
- In International Workshop on Practical Aspects of Declarative Languages (PADL'00
"... . We dene HTML as an embedded domain specic language in Haskell. To this end, we have designed and implemented a combinator library which provides the means to create and modify HTML elements. Haskell's type classes are employed to enforce well-formed HTML to a large degree. Haskell can then be ..."
Abstract
-
Cited by 19 (3 self)
- Add to MetaCart
. We dene HTML as an embedded domain specic language in Haskell. To this end, we have designed and implemented a combinator library which provides the means to create and modify HTML elements. Haskell's type classes are employed to enforce well-formed HTML to a large degree. Haskell can then be used as a meta language to map structured documents to HTML, to dene conditional content, to extract information from the documents, or to dene entire web sites. We introduce container-passing style as a programming convention for the library. We also pinpoint some shortcomings of Haskell's type system that make the task of this library's implementor tedious. Key words: embedded domain specic language, HTML, functional programming, type classes 1 Introduction Programming one web page in isolation is not hard. Programming an entire web site can be a nightmare. While simple HTML editors help with the rst task [23, 9], full blown web authoring systems are required for the other ta...

