[hunchentoot-devel] cl-who and case-sensitive XML generation
David Neu
david at davidneu.com
Tue Jun 9 18:56:56 UTC 2009
Hi Edi,
I'm running cl-who Version 1.0.0, 2009-0x-xx and sbcl 1.0.28. Setting
*downcase-tokens-p* within a LET doesn't work as I expected, but
using SETF does.
Cheers,
David
(let ((cl-who::*downcase-tokens-p* nil))
(cl-who:with-html-output-to-string (*standard-output*
nil
:indent t)
(:|Capitalized|
(:|CapitalizedCamel| :|camelCase| "foo"
"bar"))))
"
<capitalized>
<capitalizedcamel camelcase='foo'>bar
</capitalizedcamel>
</capitalized>"
CL-USER> (setf cl-who::*downcase-tokens-p* nil)
NIL
CL-USER> (cl-who:with-html-output-to-string (*standard-output*
nil
:indent t)
(:|Capitalized|
(:|CapitalizedCamel| :|camelCase| "foo"
"bar")))
"
<Capitalized>
<CapitalizedCamel camelCase='foo'>bar
</CapitalizedCamel>
</Capitalized>"
On Mon, Jun 8, 2009 at 1:57 AM, Edi Weitz<edi at agharta.de> wrote:
> On Sat, Jun 6, 2009 at 8:04 PM, Patrick May<patrick.may at mac.com> wrote:
>
>> (let ((cl-who::*downcase-tokens-p* nil))
>> (cl-who:with-html-output-to-string (*standard-output*
>> nil
>> :indent t)
>> (:|Capitalized|
>> (:|CapitalizedCamel| :|camelCase| "foo"
>> "bar"))))
>>
>> This outputs:
>>
>> "
>> <capitalized>
>> <capitalizedcamel camelcase='foo'>
>> bar
>> </capitalizedcamel>
>> </capitalized>"
>
> Which version are you using? Works for me with the dev version:
>
> CL-USER 1 > (let ((cl-who:*downcase-tokens-p* nil))
> (cl-who:with-html-output-to-string (*standard-output*
> nil
> :indent t)
> (:|Capitalized|
> (:|CapitalizedCamel| :|camelCase| "foo"
> "bar"))))
> "
> <Capitalized>
> <CapitalizedCamel camelCase='foo'>bar
> </CapitalizedCamel>
> </Capitalized>"
>
> There's no need for the double colon, BTW.
>
>> If it can, can it also generate double-
>> quoted strings ("foo" instead of 'foo')?
>
> http://weitz.de/cl-who/#*attribute-quote-char*
>
> Cheers,
> Edi.
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
More information about the Tbnl-devel
mailing list