Re: Rendering arbitrary SVG content in SVG font glyphs

On Mon, 14 Sep 2009 00:47:50 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> On Sat, Sep 12, 2009 at 2:23 AM, Alex Danilo <alex@abbra.com> wrote:
>
>> <use> doesn't clone.
>>
>
> http://www.w3.org/TR/SVG/struct.html#UseElement
>
> The effect of a 'use' element is as if the contents of the referenced
> element were deeply cloned into a separate non-exposed DOM tree which had
> the 'use' element as its parent and all of the 'use' element's ancestors  
> as
> its higher-level ancestors.
>
>
> That means that in a situation where cloning is observable, e.g. a <use>
> referring to a <foreignObject> containing an <iframe>, the implementation
> must clone.

I see what you mean now. In my interpretation this never meant you need to  
do any cloning, just that you need to construct a shadow-structure that  
contain references to the original subtree/elements. However, the wording  
in the spec does require something like a deep clone at the moment for  
cases like the one you mention. I would be in favour of changing the spec  
so that it doesn't imply or require actual deep cloning.

Also half of the sentence in my previous response unfortunately fell out:
"Or in other words, SVG 1.1 doesn't allow foreignObject child content in  
glyph elements, except possibly through one of the classes here (which is  
something the DTD doesn't"

...constrain because it can't be expressed easily in the DTD).

Another example of this is the <a> element which can contain most anything  
according to the DTD, however when inside of a <text> element for example  
the set of allowed elements needs to be constrained. See  
http://dev.w3.org/SVG/profiles/1.1F2/errata/errata.xml#linking-text-environment.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 14 September 2009 07:49:57 UTC