A typed representation for HTML and XML documents in Haskell

نویسنده

  • Peter Thiemann
چکیده

We define a family of embedded domain specific languages for generating HTML and XML documents. Each language is implemented as a combinator library in Haskell. The generated HTML/XML documents are guaranteed to be well-formed. In addition, each library can guarantee that the generated documents are valid XML documents to a certain extent (for HTML only a weaker guarantee is possible). On top of the libraries, Haskell serves as a meta language to define parameterized documents, to map structured documents to HTML/XML, to define conditional content, or to define entire web sites. The combinator libraries support element-transforming style, a programming style that allows programs to have a visual appearance similar to HTML/XML documents, without modifying the syntax of Haskell.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

UUXML: A Type-Preserving XML Schema-Haskell Data Binding

An XML data binding is a translation of XML documents into values of some programming language. This paper discusses a typepreserving XML–Haskell data binding that handles documents typed by the W3C XML Schema standard. Our translation is based on a formal semantics of Schema, and has been proved sound with respect to the semantics. We also show a program in Generic Haskell that constructs pars...

متن کامل

Scripting XML with Generic Haskell

A generic program is written once and works on values of many data types. Generic Haskell is a recent extension of the functional programming language Haskell that supports generic programming. This paper discusses how Generic Haskell can be used to implement XML tools whose behaviour depends on the DTD or Schema of the input XML document. Example tools include XML editors, databases, and compr...

متن کامل

Generic validation in an XPath-Haskell data binding

An XPath data binding for a given host language provides a translation of XPath expressions to expressions in the host language. This paper discusses an XPathHaskell data binding. XPath validation ensures that a path addresses a possibly nonempty set of nodes in XML documents described by an XML Schema. We present a generic function (defined by induction on the type structure) that validates XP...

متن کامل

Semantic Structure Representation of HTML Document Suitable for Semantic Document Retrieval

The information on the WWW is available in various formats. The RDF and XML representation provides semantic knowledge about the document where as HTML mark-up only indicates the structure and lay-out of documents, but not the document semantics. The representation of the HTML document to semantic form can facilitate the extraction of knowledge from these documents in a more efficient manner. T...

متن کامل

خوشه‌بندی فراابتکاری اسناد فارسی اِکس‌اِم‌اِل مبتنی بر شباهت ساختاری و محتوایی

Due to the increasing number of documents, XML, effectively organize these documents in order to retrieve useful information from them is essential. A possible solution is performed on the clustering of XML documents in order to discover knowledge. Clustering XML documents is a key issue of how to measure the similarity between XML documents. Conventional clustering of text documents using a do...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Funct. Program.

دوره 12  شماره 

صفحات  -

تاریخ انتشار 2002