Scrap your boilerplate with XPath-like combinators

  • Authors:
  • Ralf Lämmel

  • Affiliations:
  • Microsoft

  • Venue:
  • Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 2007

Quantified Score

Hi-index 0.01

Visualization

Abstract

XML programming involves idioms for expressing 'structure shyness' such as the descendant axis of XPath or the default templates of XSLT. We initiate a discussion of the relationships between such XML idioms and generic functional programming, while focusing on the (Haskell-based) 'Scrap your boilerplate' style of generic programming (SYB). This work gives insight into mechanisms for traversal and selection. We compare SYB and XSLT. We approximate XPath in SYB. We make a case for SYB's programmability, when compared to XPath's fixed combinators. We allude to strengthened type checking for SYB traversals so as to reject certain, trivial behaviors.