chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Problem trying to use SSAX


From: Taylor Venable
Subject: [Chicken-users] Problem trying to use SSAX
Date: Thu, 22 Oct 2009 22:10:14 -0400

Hi, I'm trying to use the ssax Egg for the first time, and running into troubles with an example taken from Oleg's site: http://okmij.org/ftp/Scheme/remove-markup.scm

When I try to run my code:

--------------------------------------------------------------------

(require-extension ssax)

(define run2
  (lambda (file)
    (let ((p (open-input-file file)))
      ((ssax:make-parser
        NEW-LEVEL-SEED
        (lambda (elem-gi attributes namespaces expected-content seed)
          seed)

        FINISH-ELEMENT
        (lambda (elem-gi attributes namespaces parent-seed seed)
          seed)

        CHAR-DATA-HANDLER
        (lambda (string1 string2 seed)
          (let* ((seed (cons string1 seed)))
            (if (string-null? string2) seed
                (cons string2 seed))))
        ) p '()))))

(let ((sxml (run2 "request.xml")))
  (display sxml)
  (newline))

----------------------------------------------------------------------------

I get this error:

-----------------------------------------------------------------------------

CHICKEN
(c)2008-2009 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.2.2 - SVN rev. 15455
macosx-unix-gnu-x86-64 [ 64bit manyargs dload ptables applyhook ]
compiled 2009-10-22 on taylor-venables-mac-mini.local (Darwin)

; loading sdi.scm ...
; loading /usr/local/lib/chicken/4/ssax.import.so ...
; loading /usr/local/lib/chicken/4/scheme.import.so ...
; loading /usr/local/lib/chicken/4/chicken.import.so ...
; loading /usr/local/lib/chicken/4/ports.import.so ...
; loading /usr/local/lib/chicken/4/srfi-13.import.so ...
; loading /usr/local/lib/chicken/4/extras.import.so ...
; loading /usr/local/lib/chicken/4/srfi-1.import.so ...
; loading /usr/local/lib/chicken/4/input-parse.import.so ...
; loading /usr/local/lib/chicken/4/ssax.so ...
; loading /usr/local/lib/chicken/4/input-parse.so ...

Error: unbound variable: ssax:scan-Misc

        Call history:

        <syntax>          (display sxml)
        <syntax>          (newline)
        <syntax>          (run2 "request.xml")
        <eval>            (run2 "request.xml")
        <eval>            [run2] (open-input-file file)
<eval> [run2] ((ssax:make-parser NEW-LEVEL-SEED (lambda (elem-gi attributes namespaces expected-content seed) seed......
        <eval>            [run2] (scan-for-significant-prolog-token-1630 
port607 seed608)
<eval> [scan-for-significant-prolog-token-1630] (ssax:scan-Misc633 port607) <--

-------------------------------------------------------------

I can't see the problem in my code, if there is one; I'm just starting to work with this so any ideas are appreciated. Thank you.

Taylor Venable
http://metasyntax.net/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]