Description

The SXML transformations (to XML, SXML, and HTML) from the SSAX project

Author

Oleg Kiselyov. Port by Zbigniew

Version

Download

sxml-transforms.egg

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:

Also, the eggdoc extension makes heavy use of sxml-transforms.

License

The sxml-transforms code is in the public domain.