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

From: Eric Biunno (01rice at gmail.com)
Date: Mon Jan 14 18:31:53 EST 2008

I'm running DrScheme, version 371 [3m].
Language: Textual (MzScheme, includes R5RS).

when I evaluate this code:

(require (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)))
(define test
  (apply
   string-append
    (sxml:clean-feed
    (stx:transform-dynamic
     (sxml:add-parents
      (sxml:document "http://modis.ispras.ru/Lizorkin/XML/poem.xml"))
     (stx:make-stx-stylesheet
       (sxml:document
       "http://modis.ispras.ru/Lizorkin/XML/poem2html.xsl"
       '((xsl . "http://www.w3.org/1999/XSL/Transform")))))))
  )
(display test)

I get this (which is what I want):
<html><head><title>The Lovesong of J. Alfred
Prufrock</title></head><body><h1>The Lovesong of J. Alfred
Prufrock</h1><p>Let us go then, you and I,<br/>When the evening is spread
out against the sky<br/>Like a patient etherized upon a table:<br/></p><p>In
the room the women come and go<br/>Talking of Michaelangelo.<br/></p><i>T.
S. Eliot</i></body></html>

when I evaluate this code:

;file foo.ss:
(module foo mzscheme

  (require (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)))

  (require (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)))
  (define test
    (apply
     string-append
     (sxml:clean-feed
      (stx:transform-dynamic
       (sxml:add-parents
        (sxml:document "http://modis.ispras.ru/Lizorkin/XML/poem.xml"))
       (stx:make-stx-stylesheet
        (sxml:document
         "http://modis.ispras.ru/Lizorkin/XML/poem2html.xsl"
         '((xsl . "http://www.w3.org/1999/XSL/Transform"))))))) ;originaly
had a leading space " http://www.w3.org/1999/XSL/Transform"
    )
  (display test)

  (provide test)
  )

;file foo-user.ss:
(require (file "foo.ss"))
(display test)

I get this error:
. . ../../../.plt-scheme/planet/300/371/cache/lizorkin/sxml.plt/1/4/stx-
engine.ss::12970: reference to undefined identifier: sxpath

Note: Please make sure that there are no leading spaces in the strings that
have the URLs of the xml/xsl pages.

Thanks for your time, I know this is frustrating.
Eric


On Jan 14, 2008 6:12 PM, John Clements <clements at brinckerhoff.org> wrote:

>
> On Jan 14, 2008, at 3:08 PM, Eric Biunno wrote:
>
> I might have spoken too soon, this doesn't seem to work:
>
> (module foo mzscheme
>   (require (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)))
>
> (define test
>   (apply
>    string-append
>     (sxml:clean-feed
>     (stx:transform-dynamic
>      (sxml:add-parents
>       (sxml:document " http://modis.ispras.ru/Lizorkin/XML/poem.xml"))
>      (stx:make-stx-stylesheet
>        (sxml:document
>        "http://modis.ispras.ru/Lizorkin/XML/poem2html.xsl"
>        '((xsl . "http://www.w3.org/1999/XSL/Transform"))))))) ;originaly
> had a leading space " http://www.w3.org/1999/XSL/Transform"
>   )
>
> (provide test))
>
>
> (module foo-user mzscheme
>   (require (file "foo.ss"))
>
>   (display test)
>   )
>
>
> More details, please.  What language level are you running in, what
> version of drscheme are you using, what (if anything) are you evaluating in
> the interactions window, etc.
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080114/c3e7241d/attachment.html>

Posted on the users mailing list.