Thank you very much for your answer. 
This code indeed provides a workaround to do exactly what I want.

Regards,
rodrigob.

--- In [email protected], Jacob Beard <jbea...@...> wrote:
>
> Hi,
> 
> I answered your question on Stack Overflow. 
> 
> Jake
> 
> On Fri, 2010-07-30 at 15:12 +0000, rodrigo_benenson wrote:
> 
> >   
> > 
> > No answers ?
> > Can at least someone tell me if this is supposed to be possible ?
> > 
> > Regards,
> > rodrigob.
> > 
> > --- In [email protected], "rodrigo_benenson"
> > <rodrigo.benenson@> wrote:
> > >
> > > Hi there !
> > > I'm trying to create a SVG file to animate a separate SVG file.
> > > 
> > > SVG standard allows to use and refer external SVG files.
> > > 
> > > I have a file circle.svg that defines a circle object with id
> > "the_circle". From the main SVG file I am able to include this circle
> > and animate it, using SVG linking.
> > > 
> > > I would also like to access the same circle object via javascript,
> > how can I do this ? What is the javascript equivalent of
> > xlink:href="url(#the_image)#the_circle" ?
> > > 
> > > Using document.getElementById('the_image') I can only access the
> > SVGImageElement but not the objects defined inside the included SVG.
> > > 
> > > Thanks for your answers !
> > > Regards,
> > > rodrigob.
> > > 
> > > 
> > > ps: This same question was posted at
> > >
> > http://stackoverflow.com/questions/3346106/accessing-a-dom-object-defined-in-an-external-svg-file
> > > 
> > > 
> > > <?xml version="1.0" standalone="no"?>
> > > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
> > "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
> > > <svg width="100%" height="100%" version="1.1"
> > > xmlns="http://www.w3.org/2000/svg";
> > xmlns:xlink="http://www.w3.org/1999/xlink"; >
> > > 
> > > <image 
> > > id="the_image"
> > > x="0" y="0" width="100%" height="100%"
> > > xlink:href="circle.svg" />
> > > 
> > > <animateTransform 
> > > xlink:href="url(#the_image)#the_circle"
> > > 
> > > attributeName="transform" attributeType="XML"
> > > type="translate" 
> > > from="0" to="25"
> > > dur="1s" repeatCount="indefinite" 
> > > additive="replace" fill="freeze" />
> > > </svg>
> > >
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> [Non-text portions of this message have been removed]
>




------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to