W3C home > Mailing lists > Public > www-svg@w3.org > May 2000

How to reference symbols defined in a separate file?

From: Herzog, Juergen <Juergen.Herzog@telekom.de>
Date: Fri, 5 May 2000 15:37:50 +0200
Message-Id: <5FC5AB326FBFD211A0920800060D9A9F05AA95CF@U8P16>
To: "'www-svg@w3.org'" <www-svg@w3.org>
Hi,

I tried to use a symbol which was defined in another file than
the one where the symbol shall be used.
The way I did it was:

# symbol-use-file: test.svg:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG December 1999//EN" 
  "SVG-19991203.dtd">
<svg width="500" height="500">
  <g>
    <use xlink:href="my_symbol.svg#my_symbol" x="150" y= "150" />
    <rect width="50" height="50" style="fill:green" />
  </g>
</svg>

# symbol-def-file: my_symbol.svg:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG December 1999//EN" 
  "SVG-19991203.dtd">
<svg width="500" height="500">
    <symbol id="my_symbol">
	    <circle cx="50" cy="50" r="20" style="fill:white;stroke:black" />
	    <circle cx="50" cy="50" r="10" style="fill:blue" />
    </symbol>
</svg>

I tried it with viewers from alphaworks and cmis:
I could only see the green rectangle but not my symbol!

What did I wrong?

Regards Jürgen


===T= Deutsche Telekom AG
> Zentrale IV-Unterstützung der Prozesse NI
> Projekt Megaplan
> Jürgen Herzog, isys software gmbh
> Mornewegstraße 45a
> Darmstadt
> ----------------------------------------------------------------
> %    Tel.:      (06151) 83-6712
> *      Fax:      
> *  Mailto:Juergen.Herzog@telekom.de
> 
> 
Received on Friday, 5 May 2000 09:58:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:47 GMT