Re: Storing/using multiple SVG documents within the same file

At 09:55 AM 11/18/99 +0100, Jan Aarsaether wrote:
>Now, to the interesting part. We have objects that needs be
>represented by a symbol and for several reasons, we would like to
>collect several symbols within the same physical file. We do this
>successfully with our proprietary (SVG-like) format today, but would
>like to be able to do this using straigth XML/SVG. Has somebody done
>anything like this? We can not be the only one looking to use SVG in
>this manner?
>
>I guess the real question is: can I refer to these svg containers from
>within the and from outside a file? If so, would this look something
>like (in pseudo-XML)
>
>
><myObject id="obj1">
> <symbol>
>  <xlink:role symbol>
>  <xlink:href="http://www.some.where/myDoc.xml#foo">
> </symbol>
></myObject>
>
><myObject id="obj2">
> <symbol>
>  <xlink:role symbol>
>  <xlink:href="http://www.some.where/myDoc.xml#bar">
> </symbol>
></myObject>
>
><myObject id="obj3">
> <symbol>
>  <xlink:role symbol>
>  <xlink:href="http://www.some.where/myDoc.xml#bar">
> </symbol>
></myObject>
>
>
>Or is this idea simply very un-SVG-like?

Jan,
Your SVG above is far from correct, but I think I see what you are trying
to do.

This is an application which SVG supports. The working group fully intends
that SVG be used for symbol libraries stored within a single SVG file which
could be referenced individually by another SVG file.

Another formulation would have one less level of indirection. Just 'use' a
symbol defined in an external file.

foo.svg:
----------
<?xml ..... >
<!DOCTYPE svg ... >
<svg ... >
   <defs>
      <symbol id="Symbol1" ... >... </symbol>
      <symbol id="Symbol2" ... >... </symbol>
      ...
   </defs>
</svg

bar.svg
-----------
<?xml ..... >
<!DOCTYPE svg ... >
<svg ... >
   <use xlink:href="http:..../foo.svg#Symbol1" ... />
</svg

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

Received on Thursday, 18 November 1999 18:20:11 UTC