[plt-scheme] using pi structs in xml.ss

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Nov 21 10:56:47 EST 2006

Ah, it appears that xml.ss, it looks like it illegal to have CDATA in
the attribute values. So, since PHP is not valid XML, I think you will
have difficulty using xml.ss to work with it. You could just copy
xml.ss and hack it to allow you to put in arbitrary text in those


On 11/21/06, wayne at taxupdate.com <wayne at taxupdate.com> wrote:
> On Tue, Nov 21, 2006 at 10:22:12AM -0500, Jay McCarthy wrote:
> > Rather than using make-pi, you can use make-pcdata or make-cdata. The
> > xexpr->xml function will not quote the strings in these structures.
> I substituted make-cdata for make-pi, and have the same problem.
> > >If I leave the pi struct as above, I get the error
> > >
> > >srep->attribute: expected (list Symbol String) given (value (php "echo
> > >$var;"))
> make-pi and make-cdata both work as expected when constructing a normal php
> section.  The problem I'm running into is placing these structs into an
> attribute's value.  the srep->attribute proc (called by xexpr->xml) chokes
> when the value portion is not a string.  This is the case if I pass either
> a pi-struct or a cdata-struct.  If, on the other hand, I pass the string
> containing "<" or ">" chars, they get transformed to the entity equivalents.
> Wayne

Jay McCarthy <jay.mccarthy at gmail.com>

Posted on the users mailing list.