Skip to main content

SXSLT: Manipulation Language for XML

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2562))

Included in the following conference series:

Abstract

The growing use of XML languages has spurred the demand for means to transform XML documents. Many XML transformation systems are, however, limited in their expressive power, and fail to provide a useful collection of combinators for several tasks. This paper describes SXSLT, a practical, higher-order, concise, expressive and readable declarative XML transformation language. The language is a head-first rewriting system over abstract XML syntax trees, implemented as a library extension of Scheme. SXSLT features local scoping of re-writing “templates”, first-class stylesheets, flexible traversal strategies, the ability to re-traverse the original or the transformed trees. The language can emulate XSLT in whole or in part, in a more coherent and expressive manner. By virtue of being a Scheme library, SXSLT is seamlessly integrated with Scheme.

We illustrate the power of SXSLT with several examples abstracted from practical projects. We and other people have used SXSLT for over two years for real-life projects, ranging from authoring of static and dynamic Web pages to content-distribution engines. Our experience and user comments show that SXSLT is expressive and easy to use. We argue that this outcome is a consequence of SXSLT providing right abstractions for XML transformations, of being higher-order, declarative and extensible.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abresch, B.: for those keeping score... A message on the PLT-Scheme mailing list. May 30, 2002 http://www.cs.utah.edu/plt/mailarch/plt-scheme-2002/msg00998.html

  2. Bosworth, A.: Programming Paradox. XML Magazine, February 2002 http://www.fawcette.com/xmlmag/2002 02/magazine/departments/endtag/

  3. Durand, D.: private communication. May 22, 2002

    Google Scholar 

  4. ISO/IEC. Information technology, Processing Languages, Document Style Semantics and Specification Languages (dsssl). Technical Report 10179:1996(E), ISO (1996)

    Google Scholar 

  5. Fuchs, M.: SOXT: Building the XSL Family of Languages. The Eleventh International World Wide Web Conference. Proc. Alternate Paper Tracks (2002) http://www2002.org/CDROM/alternate/417/index.html

  6. Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. In The 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2001) 67–80

    Google Scholar 

  7. Kiselyov, O.: Aviation total weather and SIGMET advisory queries. June 12, 2000 http://zowie.metnet.navy.mil/cgi-bin/oleg/get-advisories http://zowie.metnet.navy.mil/~dhuff/pqa/FNMOC.html

  8. Kiselyov, O.: SXML as a normalized database. April 17, 2001 http://pobox.com/~oleg/ftp/Scheme/xml.html#SXML-as-database

  9. Kiselyov, O.: A better XML parser through functional programming. In: Lecture Notes in Computer Science, Vol. 2257. Springer-Verlag, Berlin Heidelberg New York (2002) 209–224

    Google Scholar 

  10. Kiselyov, O.: SXML Specification. Revision 2.5. August 9, 2002 http://pobox.com/~oleg/ftp/Scheme/SXML.html

  11. Kiselyov, O., Krishnamurthi, S.: SXSLT: Manipulation Language for XML. Master SXML file. http://pobox.com/~oleg/ftp/Scheme/SXSLT.scm

  12. Krishnamurthi, S., Felleisen, M., Duba, B.F.: From Macros to Reusable Generative Programming. In: Lecture Notes in Computer Science, Vol. 1799. Springer-Verlag, Berlin Heidelberg New York (1999) 105–120

    Google Scholar 

  13. Krishnamurthi, S., Gray, K.E., Graunke, P.T.: Transformation-by-Example for XML. Practical Aspects of Declarative Languages (2000)

    Google Scholar 

  14. Lieberherr, K.L., Patt-Shamir, B.: Traversals of Object Structures: Specification and Efficient Implementation. Technical Report NU-CCS-97-15, College of Computer Science, Northeastern University, Boston, MA (1997)

    Google Scholar 

  15. Moertel, T.: XSLT, Perl, Haskell, & a word on language design. Posted on kuro5hin.org on January 15, 2002 http://www.kuro5hin.org/story/2002/1/15/1562/95011

  16. Wallace, M., Runciman, C.: Haskell and XML: generic combinators or type-based translation? Proc. the fourth ACM SIGPLAN international conference on Functional programming (1999) 148–159

    Google Scholar 

  17. Wallace, M., Runciman, C.: HaXml-1.07b (2002) http://www.cs.york.ac.uk/fp/HaXml/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kiselyov, O., Krishnamurthi, S. (2003). SXSLT: Manipulation Language for XML. In: Dahl, V., Wadler, P. (eds) Practical Aspects of Declarative Languages. PADL 2003. Lecture Notes in Computer Science, vol 2562. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36388-2_18

Download citation

  • DOI: https://doi.org/10.1007/3-540-36388-2_18

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-00389-2

  • Online ISBN: 978-3-540-36388-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics