Abstract
We report on the embedding of a domain specific language, (X)HTML, into Haskell and demonstrate how this web language can be represented and rendered for strong World Wide Web Consortium (W3C) compliance. Compliance of web content is important for the health of the Internet, accessibility, visibility, and reliable search. While tools exist to verify web content is compliant according to the W3C, few systems guarantee that all dynamically produced content is compliant. We present CH-(X)HTML, a library for generating compliant (X)HTML content for all dynamic content by using Haskell to encode the non-trivial syntax of (X)HTML set forth by the W3C. Any compliant document can be represented with this library, while a compilation or run-time error will occur if non-compliant markup is attempted. To demonstrate our library we present examples, performance measurements, and a discussion of library version considerations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Xmlc, http://xmlc.enhydra.org
The common gateway interface, http://hoohoo.ncsa.illinois.edu/cgi/
The disability discrimination act (dda), http://www.direct.gov.uk/en/DisabledPeople/RightsAndObligations/DisabilityRights/DG_4001068
Happs, http://happs.org/
Text.html, http://hackage.haskell.org/package/html
Xmlbeans, http://xmlbeans.apache.org/
Brewer, J., Henry, S.L.: Policies relating to web accessibility (2006), http://www.w3.org/WAI/Policy/
Bringert, B.: cgi: A library for writing cgi programs (2010), http://hackage.haskell.org/package/cgi
Bringert, B., Lemmih: fastcgi: A haskell library for writing fastcgi programs (2010), http://hackage.haskell.org/package/fastcgi
Chen, S., Hong, D., Shen, V.Y.: An experimental study on validation problems with existing html webpages. In: International Conference on Internet Computing, pp. 373–379 (2005)
Collins, G., Beardsley, D., Yu Guo, S., Sanders, J.: Snap: A haskell web framework (2010), http://snapframework.com/
Davies, D.: W3c compliance and seo (2005), http://www.evolt.org/w3c-compliance-and-seo
Elder, M., Shaw, J.: Happstack (2010), http://happstack.com/index.html
Group, W.H.W.: Xhtml 1.0: The extensible hypertext markup language, (2nd edn.) (2002), http://www.w3.org/TR/xhtml1/ , http://www.w3.org/TR/xhtml1/
Hansen, R.: Xss (cross site scripting) prevention cheat sheet (2009), http://ha.ckers.org/xss.html
Kemp, A.: Turbinado (2010), http://wiki.github.com/alsonkemp/turbinado
Kiselyov, O.: Hsxml: Typed sxml (2010), http://okmij.org/ftp/Scheme/xml.html#typed-SXML
Marlow, S., Bringert, B.: Mohws: Modular haskell web server (2010), http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mohws
Meier, S., der Jeugt, J.V.: Blazehtml (2010), http://jaspervdj.be/blaze/
Moss, T.: Disability discrimination act (dda) & web accessibility (2010), http://www.webcredible.co.uk/user-friendly-resources/web-accessibility/uk-website-legal-requirements.shtml
Nørmark, K.: Web programming in scheme with laml. J. Funct. Program. 15(1), 53–65 (2005)
Robertson, W., Vigna, G.: Static Enforcement of Web Application Integrity Through Strong Typing. In: Proceedings of the USENIX Security Symposium, Montreal, Canada (2009)
Saccoccio, R., et al.: Fastcgi (2010), http://www.fastcgi.com/drupal/
Snoyman, M.: Yesod web framework (2010), http://docs.yesodweb.com/
Thiemann, P.: A typed representation for html and xml documents in haskell. Journal of Functional Programming 12 (2001/2002)
Thiemann, P.: Programmable type systems for domain specific languages (2002a)
Thiemann, P.: WASH/CGI: Server-Side Web Scripting with Sessions and Typed, Compositional Forms. In: Adsul, B., Ramakrishnan, C.R. (eds.) PADL 2002. LNCS, vol. 2257, pp. 192–208. Springer, Heidelberg (2002b)
Thiemann, P.: An embedded domain-specific language for type-safe server-side web-scripting. ACM Transactions on Internet Technology 5, 1533–5399 (2005)
Chisholm, W., Vanderheiden, G., Jacobs, I.: Web content accessibility guidelines 1.0 (1999), http://www.w3.org/TR/WCAG10/
Wallace, M., Runciman, C.: Haskell and xml: Generic combinators or type-based translation?, pp. 148–159. ACM Press (1999)
Wittersheim, A.: Why comply? the movement to w3c compliance (2006), http://ezinearticles.com/?Why-Comply?-The-Movement-to-W3C-Compliance&id=162596
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Talaga, P.G., Chapin, S.J. (2012). Towards a Guaranteed (X)HTML Compliant Dynamic Web Application. In: Filipe, J., Cordeiro, J. (eds) Web Information Systems and Technologies. WEBIST 2011. Lecture Notes in Business Information Processing, vol 101. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28082-5_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-28082-5_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28081-8
Online ISBN: 978-3-642-28082-5
eBook Packages: Computer ScienceComputer Science (R0)