#!/bin/sh
: ; exec klone $0 "$@"
; The above line finds the klone executable in the $PATH
(setq args (getopts USAGE: xml2kxf
Is a filter converting xml to kxf
))
(defun main ()
(if args (setq in (open (0 args))) (setq in *standard-input*))
(kxf:print (sxp:parse in :keep-comments t
:keep-PIs t :keep-DTD t :forest t
) () :forest t)
)
;; sxp:parse
;; (dolist (f [sxp:PS-toplevel-header sxp:PS-toplevel-body sxp:PS-entity
;; sxp:PS-element sxp:PS-chardata sxp:PS-attribute sxp:PS-DTD-or-comments ]
;; )
;; (eval (list 'trace f))
;; )
;;=============================================================================
;; main
;;=============================================================================
(main)
;;; EMACS MODES
;;; Local Variables: ***
;;; mode:lisp ***
;;; End: ***
syntax highlighted by Code2HTML, v. 0.9.1