W3C home > Mailing lists > Public > www-svg@w3.org > July 1999

Recursive structures and conditional rendering

From: <timeshigher1@pop3.mail.demon.net>
Date: Sun, 18 Jul 1999 17:49:02 +0100
Message-Id: <>
To: www-svg@w3.org
Hi, I don't work at a graphics company but in a small corner of a large
media empire which has recently become very interested in the Internet. 

I believe SVG could break us out of the old HTML cliches and release a new
wave of creativity on the web, and I am pretty impressed with the draft
standard so far. Here's something I would like to throw into the pot.


It would be extremely useful if SVG drawings could be recursive, so that a
drawing could contain transformed versions of itself. Among other things
this would provide a compact way of specifying fractals, infinite tilings
and non-planar topologies (such as the toroidal space familiar to Asteroids

As far as I can tell from my very cursory reading, the draft standard does
not explicitly forbid recursion. What it lacks is any means for controlling
recursion and making it safe and efficient. 

One way to bring recursion explicitly into the standard would be to state
that a <use> element may reference the ID of the object that contains it. I
do not think this breaks the forward-reference rule, provided the ID is
stated at the beginning of the object declaration.
What else is needed? We would need a conditional construct to ensure that
at some point the recursion ceases and something different happens. (As
anyone who has played with fractals knows, it might only be when the
recursion terminates that anything is drawn at all.) Renderers should be
allowed to provide safety features such as a limit on recursion depth,
either as overrideable defaults or as absolute limits.

A conditional rendering construct would have many other uses. It could be
used to make additional text and symbols appear as one zooms in on a map or

I don't think this need is met by the SVG-DOM. The DOM lets you specify a
drawing's behaviour. What I have in mind is a declarative syntax which can
be used to specify parts of a drawing's structure.

Tony Durham
Digital Editor
The Times Higher Education Supplement
Admiral House, 66-68 East Smithfield
London E1 9XY
tel: +44 171 782 3256
mobile: 07957 870314
email: tdurham@timeshigher1.demon.co.uk
Received on Sunday, 18 July 1999 12:50:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:53:47 UTC