Personally, I want to write a SmartDoc document more easily, So I made this software.I think follows are the merits to use the SXML format comparing to the XML format.
You can use the power of the Scheme language.
The Emacs editor helps you with automatic indentation, because it is S-expressions.
I made this page using Sxmlcnv.I think this page is the best way to show you a sample.
It can be downloaded from Summary page of development.
[0.1.0] 1. Apply patches and advice from Oleg Kiselyov(Thanks!) 1) local-rules feature applied. 2) And other re-factorings. 2. Sxmlcnv includes a useful style sheet for SmartDoc. (SmartDoc:style-sheet) 3. Added feature : Supported error handling during loading source file. [0.0.4] 1. Apply patches and advice from Oleg Kiselyov(Thanks!) 1) Bug fix: Handling of SXML->XML's `port argument. 2) Bug fix: Better to use eqv? rather than eq? for comparing characters. 3) Advice : Better to define some functions which has no effect at the top level. 4) Advice : Better to use let* form rather than some (set! args ...) modifications. 5) Advice : Better to use an input parsing library to skip simple white-spaces rather than using regular expressions. [0.0.3] 1. Apply patches and advice from Oleg Kiselyov(Thanks!) 1) Patch : string->goodXML() instead of string->goodHTML() 2) Advice: He taught me the way to output a pretty-printed XML. 3) Advice: He taught me the way to output a well-formed XML. 4) Advice: He gave me pretty-printed XML sample code and some advice. 2. Added feature: -p switch ... Enable pretty-print feature. 3. Added feature: -P switch ... Enable pretty-print + indent feature. 4. Added feature: Added `port argument to SXML->XML(). [0.0.2] 1. Added feature: Reading source from stdin 2. Added feature: Handling Japanese character encoding type of the input. 3. Added feature: Adding suitable 'encoding=' attribute to XML Declaration. [0.0.1] first release version
This is at least a partial credits of people that have contributed to the Sxmlcnv project. Formatted in a format that allows for easy grepping and beautification by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID and fingerprint (P), description (D). Thanks, Kiyoka ---------- N: Kiyoka Nishiyama E: email@example.com D: Author of original sxmlcnv W: http://www.netfort.gr.jp/~kiyoka/ N: Oleg Kiselyov E: firstname.lastname@example.org D: Contributer of Patches and advice for 0.0.3, 0.0.4., 0.1.0
If you specify an input for sxmlcnv script, sxmlcnv guesses the encoding from the input data automatically.
sxmlcnv version 0.x.x Usage: sxmlcnv [switches] < 'sxml-file/xml-file/scm-file' > outfile or sxmlcnv [switches] 'sxml-file/xml-file/scm-file' > outfile Switches: -h ... Display this help message. -p ... Enable pretty-print feature. -P ... Enable pretty-print + indent feature. File: Action: started with # line load and eval as scheme code started with '(' load as s-exp and convert it to XML started with '<?xml' load as XML and convert it to SXML
|started with # line||load and eval as scheme code (you can use SXML->XML function)|
|started with '('||load as S-expression and convert it to XML|
|started with '<?xml'||load as XML and convert it to SXML|
You can use these functions, When sxmlcnv load as scheme code.
(SXML->XML local-rules SXML &optional port)
Sxmlcnv includes built-in style-sheet for writing SmartDoc documents concisely.
(define SmartDoc:abbrev-table '( (Keyword-1 (S-exp-1)) (Keyword-2 (S-exp-2)) (Keyword-n (S-exp-n))))