aboutsummaryrefslogtreecommitdiff
path: root/skribe/skr/xml.skr
diff options
context:
space:
mode:
authorLudovic Court`es2005-11-02 10:08:38 +0000
committerLudovic Court`es2005-11-02 10:08:38 +0000
commitb76d5e1b252967521f210eac10ddbf089dde8c6a (patch)
tree00fc81c51256991c04799d79a749bbdd5b9fad30 /skribe/skr/xml.skr
parentba63b8d4780428d9f63f6ace7f49361b77401112 (diff)
parentf553cb65b157b6df9563cefa593902d59301461b (diff)
downloadskribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.gz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.lz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.zip
Cleaned up the source tree and the installation process.
Patches applied: * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-6 Cosmetic changes. * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-7 Removed useless files, integrated packages. * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-8 Removed useless files, integrated packages. * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-9 Moved the STkLos and Bigloo code to `legacy'. * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-10 Installed Autoconf/Automake machinery. Fixed a few things. * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-11 Changes related to source-highlighting and to the manual. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-10
Diffstat (limited to 'skribe/skr/xml.skr')
-rw-r--r--skribe/skr/xml.skr111
1 files changed, 0 insertions, 111 deletions
diff --git a/skribe/skr/xml.skr b/skribe/skr/xml.skr
deleted file mode 100644
index 784b6f0..0000000
--- a/skribe/skr/xml.skr
+++ /dev/null
@@ -1,111 +0,0 @@
-;*=====================================================================*/
-;* serrano/prgm/project/skribe/skr/xml.skr */
-;* ------------------------------------------------------------- */
-;* Author : Manuel Serrano */
-;* Creation : Tue Sep 2 09:46:09 2003 */
-;* Last change : Sat Mar 6 11:22:05 2004 (serrano) */
-;* Copyright : 2003-04 Manuel Serrano */
-;* ------------------------------------------------------------- */
-;* Generic XML Skribe engine */
-;* ------------------------------------------------------------- */
-;* Implementation: */
-;* common: @path ../src/common/api.src@ */
-;* bigloo: @path ../src/bigloo/api.bgl@ */
-;* ------------------------------------------------------------- */
-;* doc: */
-;* @ref ../../doc/user/xmle.skb:ref@ */
-;*=====================================================================*/
-
-;*---------------------------------------------------------------------*/
-;* xml-engine ... */
-;*---------------------------------------------------------------------*/
-(define xml-engine
- ;; setup the xml engine
- (default-engine-set!
- (make-engine 'xml
- :version 1.0
- :format "html"
- :delegate (find-engine 'base)
- :filter (make-string-replace '((#\< "&lt;")
- (#\> "&gt;")
- (#\& "&amp;")
- (#\" "&quot;")
- (#\@ "&#x40;"))))))
-
-;*---------------------------------------------------------------------*/
-;* markup ... */
-;*---------------------------------------------------------------------*/
-(let ((xml-margin 0))
- (define (make-margin)
- (make-string xml-margin #\space))
- (define (xml-attribute? val)
- (cond
- ((or (string? val) (number? val) (boolean? val))
- #t)
- ((list? val)
- (every? xml-attribute? val))
- (else
- #f)))
- (define (xml-attribute att val)
- (let ((s (keyword->string att)))
- (printf " ~a=\"" (substring s 1 (string-length s)))
- (let loop ((val val))
- (cond
- ((or (string? val) (number? val))
- (display val))
- ((boolean? val)
- (display (if val "true" "false")))
- ((pair? val)
- (for-each loop val))
- (else
- #f)))
- (display #\")))
- (define (xml-option opt val e)
- (let* ((m (make-margin))
- (ks (keyword->string opt))
- (s (substring ks 1 (string-length ks))))
- (printf "~a<~a>\n" m s)
- (output val e)
- (printf "~a</~a>\n" m s)))
- (define (xml-options n e)
- ;; display the true options
- (let ((opts (filter (lambda (o)
- (and (keyword? (car o))
- (not (xml-attribute? (cadr o)))))
- (markup-options n))))
- (if (pair? opts)
- (let ((m (make-margin)))
- (display m)
- (display "<options>\n")
- (set! xml-margin (+ xml-margin 1))
- (for-each (lambda (o)
- (xml-option (car o) (cadr o) e))
- opts)
- (set! xml-margin (- xml-margin 1))
- (display m)
- (display "</options>\n")))))
- (markup-writer #t
- :options 'all
- :before (lambda (n e)
- (printf "~a<~a" (make-margin) (markup-markup n))
- ;; display the xml attributes
- (for-each (lambda (o)
- (if (and (keyword? (car o))
- (xml-attribute? (cadr o)))
- (xml-attribute (car o) (cadr o))))
- (markup-options n))
- (set! xml-margin (+ xml-margin 1))
- (display ">\n"))
- :action (lambda (n e)
- ;; options
- (xml-options n e)
- ;; body
- (output (markup-body n) e))
- :after (lambda (n e)
- (printf "~a</~a>\n" (make-margin) (markup-markup n))
- (set! xml-margin (- xml-margin 1)))))
-
-;*---------------------------------------------------------------------*/
-;* Restore the base engine */
-;*---------------------------------------------------------------------*/
-(default-engine-set! (find-engine 'base))