On 10/05/06, Jim Bender <ji...@be...> wrote:
> 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")))
I understand what the problem is but it is not nice to get the error
in write-xml if the problem is buried deep inside the structure.
Still, I also understand why this happens if you are using write-xml
recursively down the tree or something like that.
Thanks,
Paulo Matos
> 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
>
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group
|