Re: [Webit-discuss] (h4:html ...) is procedure... why?
Status: Alpha
Brought to you by:
benderjg
|
From: Jim B. <ji...@be...> - 2006-05-09 23:13:40
|
Hi Paulo,
On May 9, 2006, at 3:03 PM, Paulo J. Matos wrote:
> Hi all,
>
> I'm creating some webpages using Webit!, but something wierd is
> happening:
> (let ([xml-node-page
> (h4:html
> (h4:head
> (h4:title page-title))
> (h4:body
> (h4:div
> page-title
> (h4:table h4:width: "100%"
> (h4:tr
> (h4:td h4:width: "20%"
> ((stylesheet->expander navbar-stylesheet) navbar))
> (h4:td h4:width: "80%"
> ((stylesheet->expander
> stylesheet) page-item)))))))])
> (write-xml xml-node-page))
>
> is giving me this error (on PLT-Scheme 301.12):
> write-xml: unknown datatype, given #<procedure:cntr>
>
> How is this possible?
> (write-xml (h4:html)) works ok!
>
> Any ideas?
#<procedure:cntr> is a procedure/name used in constructing the binding
for an element tag, such as h4:table. This suggest that somewhere you
have an element constructor used as a value, when you intended to have
a procedure application. For example,
(write-xml (h4:table h4:tr "table-row-contents")))
will produce the error message given above. The following will correct
the problem:
(write-xml (h4:table (h4:tr "table-row-contents")))
The code in your email does not seem to be the cause of the error
message,
per se. Have a look at what happens with the following expressions:
(write-xml ((stylesheet->expander navbar-stylesheet) navbar))
and
(write-xml ((stylesheet->expander stylesheet) page-item))
I suspect that the error is either in one of these two stylesheets, or
in
the navbar or page-item themselves.
Jim
|