[cl-who-devel] Case-sensitive XML
Osei Poku
opoku at ece.cmu.edu
Mon Nov 12 00:27:58 UTC 2007
On Sun, Nov 11, 2007 at 04:16:04PM -0800, Ken Harris wrote:
> Hi!
>
> I'm having trouble outputting case-sensitive XML using cl-who. The
> *downcase-tokens-p* variable claims to be the answer, but it only
> controls whether the output is all-upper-case or all-lower-case:
>
> (setq *downcase-tokens-p* nil)
> (with-html-output-to-string (s) (:twoWords))
> => "<TWOWORDS/>"
You must quote the symbol with |symBol|. ie
(setq *downcase-tokens-p* nil)
(with-html-output-to-string (s) (:|twoWords|))
=> "<twoWords/>"
OR
=> "<twoWords></twoWords>"
>
> (setq *downcase-tokens-p* t)
> (with-html-output-to-string (s) (:twoWords))
> => "<twowords/>"
>
> I don't get how this is supposed to help with case-sensitive XML:
> keywords (like all symbols) are case-folded by the CL reader before
> cl-who sees them, no? :twoWords => :TWOWORDS. To support generation
> of XML with mixedCase tags or attributes, I would think that cl-who
> would need to allow strings where it allows only keywords now.
>
> Or maybe I'm just completely missing something, because the question
> that prompted the creation of *downcase-tokens-p* was a camelCase
> attribute.
>
> Can cl-who support mixedCase tags/attributes? Or if it's as simple as
> changing (keywordp x) to (or (keywordp x) (stringp x)), would such a
> patch be well-received?
>
> thanks!
>
>
> - Ken
> _______________________________________________
> cl-who-devel site list
> cl-who-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-who-devel
--
Osei Poku
PhD Student, ECE
Carnegie Mellon University
412.268.2687 (work)
More information about the Cl-who-devel
mailing list