W3C home > Mailing lists > Public > www-svg@w3.org > October 2010

Re: does <set> add an attribute to node.attributes

From: Alex Danilo <alex@abbra.com>
Date: Mon, 18 Oct 2010 13:33:43 +1100
Message-Id: <7GSGAL.WRKSPE6U4XH4@abbra.com>
To: Brian Birtles <birtles@gmail.com>
Cc: www-svg@w3.org
Hi Brian,

--Original Message--:
>Just to clarify, not changing the DOM attribute values does seem to be
>normative. From SMIL 3.0:
>  The presentation value which results from applying an animation is
>not visible through the DOM.[1]

Thanks for clarifying.

>(That said, elsewhere there appear to be concessions for
>implementations where that is difficult.[2])
>However, SVG has added interfaces for querying these values.
>That, however, means that creating a snapshot does take a fair bit of
>code as one needs to go through SVG's animated type interfaces rather
>than just hasAttribute/getAttribute. That might be unfortunate, but
>it's the case regardless of whether the attribute is created or not.
>[1] http://www.w3.org/TR/SMIL/smil-DOM.html
>[2] http://www.w3.org/TR/SMIL/smil-animation.html#animationNS-AnimationSandwichModel
>"In some implementations of DOM, it may be difficult or impractical to
>maintain a presentation value as described..."

Similarly, these are from the same Rec:

'Specifically, animating an attribute defined in XML will modify
the presentation value before it is passed through the style sheet
cascade, using the XML DOM value as its base.'

Note, 'using the XML DOM value as its base'.

In the case of a 'to' animation, there's nothing
you can do without the base attribute.


'Animating an attribute or property defined in a style sheet
language will modify the presentation value passed through the
remainder of the cascade.'

So if it's CSS it's different.

If the target of the animation is an attribute and not a
property and the attribute isn't there, no animation
should happen since there is no XML DOM value.

Then there is also this important section:

'Some animations (e.g. animateMotion) will implicitly target an
attribute, or possibly several attributes (e.g. the "posX" and
"posY" attributes of some layout model). <snip/> For animation
elements that implicitly target attributes, the host language
designer must specify which attributes are implicitly targeted,
and the runtime must accordingly combine animations for the
respective attributes.'

So for implicitly targeted attributes, it's the host language
that defines the behaviour and none is defined in SVG.

Some implementers (Opera) have chosen to add one, that may
be a bug or a feature, the spec. doesn't define it.

Cameron expects the animation to happen without a base XML
DOM value, however in the case of some animations like 'to'
animations, etc. it's impossible to handle them without
a base value.

SVG needs to define if they run or not, and if they create
missing target attributes in the course of running a SMIL

What is correct behaviour is unknown right now from what
I can see.

If no attribute is to be created, then SVG needs to define
what happens, such as using the lacuna value for missing
attributes, but that has yet to be written down anywhere.

Received on Monday, 18 October 2010 02:34:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:28 UTC