Re: SVG 1.2 Comment: 4 Flowing text and graphics

* Cameron McCormack wrote:
>I think in general XSLT is not so good for generating SVG from XML data,
>simply because to decide where to lay out objects you need to have some
>idea about the dimensions of certain objects.  Text is probsbly the main
>culprit here, since you can't know ahead of time exactly what dimensions
>your text will have--a different font may be chosen, for example.  And
>it isn't always best to simply say "well just emebed your font so you
>know exactly what it will be"; sometimes you don't want to do this.

Indeed, it is most disappointing that the SVG Working Group was so
far unable to come up with a proper solution for this problem.

>But it is possible.  Your XSLT could generate a bunch of script to adapt
>to potential font changes.  With sXBL this would be better, since the
>script is contained in an sXBL definition, and your XSLT only has to
>output sXBL component instantiation elements.

You could also use script alone, I wrote a simple charting component
that generates bar charts from SVG documents with lots of

  <item><key>foo</key><value>100</value></item>
  ...

data that adapts to font sizes, etc. which can be specified e.g. using a
style element in the SVG document. But this sucks quite a lot...

Received on Thursday, 4 November 2004 13:57:13 UTC