Discussion:
case sensitive tag
Mac Chan
2007-03-20 00:00:35 UTC
Permalink
Hi,

Another handy use of cl-who is to generate xml testing data, like so:

(with-html
(loop repeat 500 do
(htm
(:|Item|
(:|ASIN| (str (format nil "~D" (random 9999999999))))
(:|DetailPageURL| "http://www.amazon.com/")
(:|ItemAttributes|
(:|Author| (str (conc (random-word) " " (random-word))))
(:|Manufacturer| (str (random-word)))
(:|ProductGroup| (str (random-word)))
(:|Title| (str (conc (random-word) " " (random-word)" "
(random-word)))))))))


Attached is a simple patch to introduce a special var
cl-who:*downcase-tag* to control whether cl-who should downcase
tagname by default.

Originally I thought just using the (eql *html-mode* :xml) test should
be sufficient. But I see that a lot of people actually only use
lowercase xml tags for internal projects and requiring them to quote a
symbol with :|| is kind of inconvenient.

Cheers,
-- Mac
Edi Weitz
2007-03-22 22:40:23 UTC
Permalink
Post by Mac Chan
(with-html
(loop repeat 500 do
(htm
(:|Item|
(:|ASIN| (str (format nil "~D" (random 9999999999))))
(:|DetailPageURL| "http://www.amazon.com/")
(:|ItemAttributes|
(:|Author| (str (conc (random-word) " " (random-word))))
(:|Manufacturer| (str (random-word)))
(:|ProductGroup| (str (random-word)))
(:|Title| (str (conc (random-word) " " (random-word)" "
(random-word)))))))))
Attached is a simple patch to introduce a special var
cl-who:*downcase-tag* to control whether cl-who should downcase
tagname by default.
Originally I thought just using the (eql *html-mode* :xml) test
should be sufficient. But I see that a lot of people actually only
use lowercase xml tags for internal projects and requiring them to
quote a symbol with :|| is kind of inconvenient.
Thanks. I can't apply the patch, though. Can you send the output of
"diff -u" please?

Thanks,
Edi.
Mac Chan
2007-03-23 00:59:30 UTC
Permalink
Here you go. Hopefully I didn't mess up this time :-)
Edi Weitz
2007-03-23 14:54:33 UTC
Permalink
Post by Mac Chan
(with-html
(loop repeat 500 do
(htm
(:|Item|
(:|ASIN| (str (format nil "~D" (random 9999999999))))
(:|DetailPageURL| "http://www.amazon.com/")
(:|ItemAttributes|
(:|Author| (str (conc (random-word) " " (random-word))))
(:|Manufacturer| (str (random-word)))
(:|ProductGroup| (str (random-word)))
(:|Title| (str (conc (random-word) " " (random-word)" "
(random-word)))))))))
Attached is a simple patch to introduce a special var
cl-who:*downcase-tag* to control whether cl-who should downcase
tagname by default.
Thanks, I've now released a new version which incorporates your patch.
Loading...