[plt-scheme] Fwd: sxml.ss - Works on its own, but not in module

From: John Clements (clements at brinckerhoff.org)
Date: Tue Jan 15 10:46:57 EST 2008

I'm forwarding this message; it comes from one of the authors of the  
sxml package, Dmitry Lizorkin. I'm hoping he won't mind that I'm  
cc:ing the plt-scheme list.

Begin forwarded message:

> ----- Original Message -----
> From: "John Clements" <clements at brinckerhoff.org>
> To: "Eric Biunno" <01rice at gmail.com>
> Cc: <plt-scheme at list.cs.brown.edu>
> Sent: Monday, January 14, 2008 1:41 AM
> Subject: Re: [plt-scheme] sxml.ss - Works on its own, but not in  
> module
>>> But when I create a module with this code and then call (test) from
>>> another file I get the following error:
>>> .plt-scheme/planet/300/371/cache/lizorkin/sxml.plt/1/4/stx-
>>> engine.ss::12970: reference to undefined identifier: sxpath
> In the error message shown above, 'sxpath' is obviously called by
> 'eval'. Could this observation be a clue for the error? (I am not an
> expert in PLT module system rules, but I experienced similar issues
> with Bigloo.)
> Can the modules be organized then to resolve the issue?
> The most straightforward workaround is probably to 'require' not only
> "foo.ss" in foo-user module, but the sxml module as well (untested):
> (module foo-user mzscheme
>  (require (file "foo.ss"))
>  (require (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)))
> Any more elegant solution?
> Hope this helps.
> Dmitry

Posted on the users mailing list.