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,