You are looking at historical revision 3274 of this page. It may differ significantly from its current revision.
This is version 1.1 of the sxml-transforms extension library for Chicken Scheme.
Description
The SXML transformations (to XML, SXML, and HTML) from the SSAX project
Documentation
This egg provides the SXML transforms available in the SSAX/SXML Sourceforge project. It incorporates one main extension, and an auxiliary one:
'''extension:''' (require-extension sxml-transforms)
- From SXML-tree-trans.scm
- : SRV:send-reply pre-post-order post-order foldts replace-range
- From SXML-to-HTML.scm
- : SXML->HTML entag enattr string->goodHTML
- From SXML-to-HTML-ext.scm
- : universal-conversion-rules universal-protected-rules alist-conv-rules
- From util.scm
- : make-char-quotator
- Chicken-specific modifications
- : ; entag-xhtml entag-html :
entag-xhtml closes XHTML tags properly in an HTML compatible way. entag is now an alias for entag-xhtml, so this behaviour is the default. entag-html is an alias for the original entag.
Newlines before open tags in the rendered HTML output are omitted for inline elements, such as tt and strong. This prevents the introduction of extraneous whitespace.
Also, the universal conversion rules have been augmented a bit:
'''rule:''' (& ENTITY-NAME ...)
Quotes character references given by strings ENTITY-NAME ....
Example: (& "ndash" "quot") => "–""
'''extension:''' (require-extension sxml-to-sxml)
Provides pre-post-order-composable, a variant of pre-post-order which always outputs strictly-conformant SXML. This comes from sxml-to-sxml.scm.
Examples
Oleg's site is the main resource. Be sure to read his examples and the ones in the SSAX repository (also included in the egg). The following papers were of great help:
- http://okmij.org/ftp/papers/SXs-talk.pdf
- http://okmij.org/ftp/papers/SXs.pdf
- http://okmij.org/ftp/papers/SXSLT-talk.pdf Also, the eggdoc extension makes heavy use of sxml-transforms.
About this egg
Author
Oleg Kiselyov. Port by Zbigniew
Version history
- 1.1
- Improve inline element whitespace handling; add '&' rule.
- 1.0
- Initial release
License
The sxml-transforms code is in the public domain.