SVG document structure : Referencing ( continued )
The
<symbol>
tag allows to define graphical objects that can be reused in the following cases
Multiples instances of the same object
Basic object referenced by many others
Definition of an element of a font
...
The
<use>
tag should be used to reference elements defined inside a
<defs>
structure ( sort of inclusion )
Example :
<defs>
<symbol id="s1" >
......
</symbol>
</defs>
<g >
<use xlink:href="#s1" />
</g>
The
use
element can reference :
either an element of the same file whose ancestor is a
<defs>
element
or an element of another file whose ancestor is a
<defs>
element
Didier Courtaud
The SVG language
Novembre 2001
13 / 74