Re: Can symbol contain width and height attributes?

Am Mittwoch, 13. August 2008 14:45 geschrieben:
> I think firefox and batik use width and height in 'symbol' as default
> value for width and height in 'use', so it makes some sense. Also
> documentation about referencing 'symbol' with 'use' is a bit unclear.
> It says 'symbol' is deep cloned into generated tree, with exception
> that 'symbol' is replaced with 'svg'. It might give an impression than
> 'symbol' attributes are cloned as well.
>

As far as I understand this, having this example:


....
<symbol id="x" viewBox="-30 20 110 700" preserveAspectRatio="none"
fill="blue" ...>

....
</symbol>

....
<use xlink:href="#x" x="100" y="140" width="200" height="220" fill="red" .../>

....



This is rendered like (apart from the problem, that this cannot really be
replaced multiple times because of the id-Attribute in a real document):

<g transform="translate(100,140)"  fill="red" ...>

<svg id="x" viewBox="-30 20 110 700" preserveAspectRatio="none"
width="200" height="220" fill="blue" ...>

....
</svg>

</g> 

....

What is your interpretation?

Received on Wednesday, 13 August 2008 15:56:07 UTC