Re: Few questions about SVG 1.2

Hi Cameron,

Cameron McCormack wrote:
> I have a couple of questions about the SVG 1.2 draft.  (Wasn't a new one
> forthcoming?)

It is :)

> 1. What would happen if I used traitDef to define a CSS trait that took
> an SVG type that wasn't already supported in CSS?  For example:
> 
>   <traitDef name="matrix" type="CSS" valueType="SVGMatrix"/>

I believe that the point is more to get the SMIL engine to understand 
how to animate something rather than to get the CSS engine to know what 
different values there are. But I get the feeling I'm missing part of 
your question, I'm not sure what to describe in terms of "what would 
happen".

> (Shouldn't these attributes be attributeName and attributeType for
> consistency with the SMIL elements?)

Consistency has great value, but I think there are limits. I have no 
strong feelings but I like the shorter names better here.

> 2. I notice that in ASV6 document.getElementById will find elements
> which are in shadow trees but really the shadow tree isn't part of the
> document tree so this is not correct, right?

That is indeed not correct, it violates the encapsulation of shadow trees.

>  That would mean that any
> time authors want to look up elements in shadow trees by id they would
> need to explictly include an svg element in their shadow tree so they
> can call SVGSVGElement.getElementById.  This seems a bit awkward and
> unnecessary.  Perhaps SVGShadowElement could include a getElementById as
> well?  Or derive from SVGSVGElement?

The interface to shadow trees clearly needs this. The (even more 
forthcoming!) sXBL draft shall make this whole area a lot clearer.

-- 
Robin Berjon

Received on Sunday, 29 August 2004 16:25:42 UTC