W3C home > Mailing lists > Public > www-svg@w3.org > November 2004

Re: SVG 1.2 Comment: 4 Flowing text and graphics

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Thu, 4 Nov 2004 17:53:47 +1100
To: www-svg@w3.org
Message-ID: <20041104065347.GA18080@mcc.id.au>

Peter Sorotokin:
> Well, if you want to use <metaphor> and <smile>, you probably also should 
> use <spacecraft> as well (not simply a drawing of spacecraft) and use 
> something like XSLT stylesheet to transform it into the final-form 
> SVG.  Mixing <svg:path> with <metaphor> does not seem to be particularly 
> appropriate.

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.
Especially in mobile situations where you wish to keep the file size
down, and it doesn't matter exactly which font is chosen, but you want
your document to respond to the font chosen.  There would need to be
some sort of knowledge about the SVG model from within the XSLT.

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.

What I would like to see, in the future, is a general way of taking data
and converting it to an appropriate presentation form.  I want this data
to be specified in RDF, and for some sort of transformation to generate
SVG (for graphical viewing), XHTML (for textual viewing), VoiceXML (for
aural "viewing"), etc., according to the user's needs.  XSLT is not so
well positioned to transform RDF; it's a little tricky to handle all
forms of RDF/XML that you might encounter.

Then I could could send to the client RDF describing the sun and
spaceship, and have it describe the spaceship's flight path, and for
this to be converted into SVG or whatever as appropriate.  This is much
more semantically rich than just representing a spaceship with a
my:spaceship XBL element.

But I imagine this model is a ways off yet.

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922
Received on Thursday, 4 November 2004 06:53:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:52 UTC