I am evaluating cl-who for the capability of generating svg documents. One issue I have encountered is the viewBox attribute of a top-level svg tag which appears to be case sensitive.
so for example:
(with-html-output (*standard-output* nil :indent t) (:svg :width "500" :height "400" :viewBox "0 0 1000 800" (:rect :x "1" :y "1" :width "600" :height "500" :fill "none" :stroke-width "4" :stroke "red")) nil)
gives:
<svg width='500' height='400' viewbox='0 0 1000 800'> <rect x='1' y='1' width='600' height='500' fill='none' stroke-width='4' stroke='red'/> </svg>
which outputs a rectangle with some of the edges outside the viewable area instead of inside the viewable area. Ideally the point of viewbox is to scale all the coordinates used within the svg tag such that they fit in the specified width and height of the svg tag.
Is there a clean way (other than special casing that tag) to create the case sensitive attribute?
I am not sure why it is case-sensitive but the following viewers seem to recognize the camelCase version and not the all lowercase version.
opera inkscape sketsa SVG graphics editor xara xtreme
Thanks,
On Fri, 10 Aug 2007 13:40:18 -0400, Osei Poku osei.poku@gmail.com wrote:
Is there a clean way (other than special casing that tag) to create the case sensitive attribute?
No, currently not. We'd need a patch similar to the one for *DOWNCASE-TAGS-P* for that one (or maybe one should subsume downcasing of tags and attributes into one special variable).
Cheers, Edi.
On Fri, Aug 10, 2007 at 11:29:57PM +0200, Edi Weitz wrote:
On Fri, 10 Aug 2007 13:40:18 -0400, Osei Poku osei.poku@gmail.com wrote:
Is there a clean way (other than special casing that tag) to create the case sensitive attribute?
No, currently not. We'd need a patch similar to the one for *DOWNCASE-TAGS-P* for that one (or maybe one should subsume downcasing of tags and attributes into one special variable).
Patch attached. Naturally comments welcome.
I did the latter and replaced *DOWNCASE-TAGS-P* with *DOWNCASE-TOKENS-P*. This make both element names and attributes case sensitive when set to nil.
Cheers, Edi. _______________________________________________ cl-who-devel site list cl-who-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-who-devel
On Fri, 10 Aug 2007 20:21:07 -0400, Osei Poku opoku@ece.cmu.edu wrote:
Patch attached. Naturally comments welcome.
Thanks for the patch which is in the new release. It took me a bit longer to apply it as it wasn't complete - the HTML docs were missing.
Cheers, Edi.
On Fri, Aug 24, 2007 at 10:06:00AM +0200, Edi Weitz wrote:
On Fri, 10 Aug 2007 20:21:07 -0400, Osei Poku opoku@ece.cmu.edu wrote:
Patch attached. Naturally comments welcome.
Thanks for the patch which is in the new release. It took me a bit longer to apply it as it wasn't complete - the HTML docs were missing.
Sorry. I should not have assumed that they were automatically generated.
Cheers, Edi. _______________________________________________ cl-who-devel site list cl-who-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-who-devel