SXML
SXML is an alternative syntax for writing XML data (more precisely, XML Infosets ) as S-expressions, to facilitate working with XML data in Lisp and Scheme. An associated suite of tools implements XPath, SAX and XSLT for SXML in Scheme and are available in the GNU Guile implementation of that language. Textual correspondence between SXML and XML for a sample XML snippet is shown below: Compared to other alternative representations for XML and its associated languages, SXML has the benefit of being directly parsable by existing Scheme implementations. The associated tools and documentation were praised in many respects by David Mertz in his IBM developerWorks column, though he also criticized the preliminary nature of its documentation and system.
SXML is an alternative syntax for writing XML data (more precisely, XML Infosets ) as S-expressions, to facilitate working with XML data in Lisp and Scheme. An associated suite of tools implements XPath, SAX and XSLT for SXML in Scheme and are available in the GNU Guile implementation of that language. Textual correspondence between SXML and XML for a sample XML snippet is shown below: Compared to other alternative representations for XML and its associated languages, SXML has the benefit of being directly parsable by existing Scheme implementations. The associated tools and documentation were praised in many respects by David Mertz in his IBM developerWorks column, though he also criticized the preliminary nature of its documentation and system. ==Example== Take the following simple XHTML page: An example page Hi, there! This is just an ">>example<<" to show XHTML & SXML. After translating it to SXML, the same page now looks like this: (*TOP* (@ (*NAMESPACES* (x "http://www.w3.org/1999/xhtml"))) (x:html (@ (xml:lang "en") (lang "en")) (x:head (x:title "An example page")) (x:body (x:h1 (@ (id "greeting")) "Hi, there") (x:p "This is just an \">>example Each element's tag pair is replaced by a set of parentheses. The tag's name is not repeated at the end, it is simply the first symbol in the list. The element's contents follow, which are either elements themselves or strings. There is no special syntax required for XML attributes. In SXML they are simply represented as just another node, which has the special name of @ . This can't cause a name clash with an actual "@" tag, because @ is not allowed as a tag name in XML. This is a common pattern in SXML: anytime a tag is used to indicate a special status or something that is not possible in XML, a name is used that does not constitute a valid XML identifier. In SXML strings there are two characters that must be escaped, the " string delimiter (with \" ) and the \ escape symbol itself (with \\ ). The XML code above requires escaping three: & , < and > (with &amp; , &lt; and &gt; respectively). ==References== ==External links== SXML Tools Tutorial by Dmitry Lizorkin SXML package for Racket
References
- SXML Specification · retrieved 2026-11-19 · rev 1309060119
Cite this reference
MLA "SXML Specification." Kiselyov, Oleg (2002). 2026-11-19. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.
Chicago "SXML Specification." Kiselyov, Oleg (2002). 2026-11-19. https://en.wikipedia.org/wiki/Doi_(identifier).
APA Kiselyov, Oleg (2002). (2026). SXML Specification. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)
- Kiselyov, Oleg; Lisovsky, Kirill (2002). XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT (PDF) . International Lisp Conference. Wikipedia revision 1309060119, retrieved 2026-11-20 · retrieved 2026-11-19 · rev 1309060119
Cite this reference
MLA "Kiselyov, Oleg; Lisovsky, Kirill (2002). XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT (PDF) . International Lisp Conference. Wikipedia revision 1309060119, retrieved 2026-11-20." Kiselyov, Oleg; Lisovsky, Kirill (2002). 2026-11-19. http://okmij.org/ftp/papers/SXs.pdf. Accessed 24 November 2026.
Chicago "Kiselyov, Oleg; Lisovsky, Kirill (2002). XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT (PDF) . International Lisp Conference. Wikipedia revision 1309060119, retrieved 2026-11-20." Kiselyov, Oleg; Lisovsky, Kirill (2002). 2026-11-19. http://okmij.org/ftp/papers/SXs.pdf.
APA Kiselyov, Oleg; Lisovsky, Kirill (2002). (2026). Kiselyov, Oleg; Lisovsky, Kirill (2002). XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT (PDF) . International Lisp Conference. Wikipedia revision 1309060119, retrieved 2026-11-20. Retrieved November 24, 2026, from http://okmij.org/ftp/papers/SXs.pdf
- Kiselyov, Oleg; Krishnamurthi, Shriram (2003). SXSLT: Manipulation Language for XML . Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 2562. pp. 256– 272. doi : 10.1007/3-540-36388-2_18 . ISBN 978-3-540-00389-2 . Wikipedia revision 1309060119, retrieved 2026-11-20 · retrieved 2026-11-19 · rev 1309060119
Cite this reference
MLA "Kiselyov, Oleg; Krishnamurthi, Shriram (2003). SXSLT: Manipulation Language for XML . Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 2562. pp. 256– 272. doi : 10.1007/3-540-36388-2_18 . ISBN 978-3-540-00389-2 . Wikipedia revision 1309060119, retrieved 2026-11-20." Kiselyov, Oleg; Krishnamurthi, Shriram (2003). 2026-11-19. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.
Chicago "Kiselyov, Oleg; Krishnamurthi, Shriram (2003). SXSLT: Manipulation Language for XML . Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 2562. pp. 256– 272. doi : 10.1007/3-540-36388-2_18 . ISBN 978-3-540-00389-2 . Wikipedia revision 1309060119, retrieved 2026-11-20." Kiselyov, Oleg; Krishnamurthi, Shriram (2003). 2026-11-19. https://en.wikipedia.org/wiki/Doi_(identifier).
APA Kiselyov, Oleg; Krishnamurthi, Shriram (2003). (2026). Kiselyov, Oleg; Krishnamurthi, Shriram (2003). SXSLT: Manipulation Language for XML . Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 2562. pp. 256– 272. doi : 10.1007/3-540-36388-2_18 . ISBN 978-3-540-00389-2 . Wikipedia revision 1309060119, retrieved 2026-11-20. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)
- XML Matters: Investigating SXML and SSAX · retrieved 2026-11-19 · rev 1309060119
Cite this reference
MLA "XML Matters: Investigating SXML and SSAX." Mertz, David (23 October 2003). 2026-11-19. https://web.archive.org/web/20041204123716/http://www-106.ibm.com/developerworks/library/x-matters31.html. Accessed 24 November 2026.
Chicago "XML Matters: Investigating SXML and SSAX." Mertz, David (23 October 2003). 2026-11-19. https://web.archive.org/web/20041204123716/http://www-106.ibm.com/developerworks/library/x-matters31.html.
APA Mertz, David (23 October 2003). (2026). XML Matters: Investigating SXML and SSAX. Retrieved November 24, 2026, from https://web.archive.org/web/20041204123716/http://www-106.ibm.com/developerworks/library/x-matters31.html
- Kiselyov, Oleg. XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT . 2002. · retrieved 2025-08-31 · rev 1309060119
Cite this reference
MLA "Kiselyov, Oleg. XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT . 2002." Kiselyov, Oleg. 2025-08-31. https://en.wikipedia.org/w/index.php?oldid=1309060119. Accessed 24 November 2026.
Chicago "Kiselyov, Oleg. XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT . 2002." Kiselyov, Oleg. 2025-08-31. https://en.wikipedia.org/w/index.php?oldid=1309060119.
APA Kiselyov, Oleg. (2025). Kiselyov, Oleg. XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT . 2002. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1309060119
- Mertz, David. XML Matters: Investigating SXML and SSAX . · retrieved 2025-08-31 · rev 1309060119
Cite this reference
MLA "Mertz, David. XML Matters: Investigating SXML and SSAX ." Mertz, David. 2025-08-31. https://en.wikipedia.org/w/index.php?oldid=1309060119. Accessed 24 November 2026.
Chicago "Mertz, David. XML Matters: Investigating SXML and SSAX ." Mertz, David. 2025-08-31. https://en.wikipedia.org/w/index.php?oldid=1309060119.
APA Mertz, David. (2025). Mertz, David. XML Matters: Investigating SXML and SSAX . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1309060119
Cite this article
MLA
"SXML." encyclopegia.org, 2025, https://encyclopegia.org/wiki/sxml. Accessed 24 November 2026.
Chicago
"SXML." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/sxml.
APA
encyclopegia.org. (2025). SXML. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/sxml
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON