Results 1 -
2 of
2
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.
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...

