[plt-scheme] using Scheme Boxes to embed data in attributes withitn XML Boxes

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Oct 20 09:25:33 EDT 2008

If the entire attribute's value is in the scheme box, you should be okay, ie:

  <path d={scheme-box}(string-append "M " astring){/schemebox}>s</path>

Robby

On Mon, Oct 20, 2008 at 5:58 AM, Stephen De Gabrielle
<spdegabrielle at gmail.com> wrote:
> Hi,
>
> I just found this behaviour;
>
> using Scheme Boxes to embed data in attributes within XML Boxes causes an error
>
> Module Language: invalid module text
> read-char: non-character in an unsupported context, from port:
> #<input-port:unsaved-editor26102>
>
> I understand that "These expressions are evaluated and their contents
> are placed into the containing XML box's xexpr."
> and that the quotes around the expression value that the scheme box is
> embedded into are the cause.
>
> Does anyone have a simple way around the problem? Can I 'escape' my
> way out of this?
>
>
> Cheers,
>
> Stephen
>
>
> ---
>
> #lang scheme
> (require xml)
>
> (let ((astring "daasda" ))
>    {xml-box}<path d="M {scheme-box}astring{/scheme-box}" > s</path>{/xml-box}
>    )
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.