Take the following simple XHTML page:
After translating it to SXML, the same page now looks like this:
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 & ,<and > respectively).
Kiselyov, Oleg (2002). "SXML Specification". ACM SIGPLAN Notices. 37 (6): 52–58. doi:10.1145/571727.571736. S2CID 13955814. /wiki/Doi_(identifier) ↩
Kiselyov, Oleg; Lisovsky, Kirill (2002). XML, XPath, XSLT Implementations as SXML, SXPath, and SXSLT (PDF). International Lisp Conference. 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. 978-3-540-00389-2 ↩
Mertz, David (23 October 2003). "XML Matters: Investigating SXML and SSAX". IBM developerWorks. Archived from the original on 4 December 2004. Retrieved 10 January 2015. https://web.archive.org/web/20041204123716/http://www-106.ibm.com/developerworks/library/x-matters31.html ↩