W3C home > Mailing lists > Public > www-svg@w3.org > December 2004

[SVG 1.2 Comment] 3.7 last example

From: KONO Masahiko <kono.masahiko@canon.co.jp>
Date: Fri, 17 Dec 2004 13:48:41 +0900
To: www-svg@w3.org
Message-Id: <20041217134658.9D2D.KONO.MASAHIKO@canon.co.jp>

Dear SVG WG,

3.7 The traitDef element

In the 3.7 last example, <xbl:template> may include <rect> and so on.

<xbl:definition element="foo:button">
  <traitDef name="x" namespace="" valueType="http://www.w3.org/2000/svg#SVGLength"/>
  <traitDef name="y" namespace="" valueType="http://www.w3.org/2000/svg#SVGLength"/>
  <traitDef name="width" namespace="" valueType="http://www.w3.org/2000/svg#SVGLength"/>
  <traitDef name="height" namespace="" valueType="http://www.w3.org/2000/svg#SVGLength"/>
  <xbl:template>
    <rect x="100" y="120" width="60" height="48"/>
  </xbl:template>
</xbl:definition>

<foo:button x="0" y="0" width="120" height="100"/>

But attributes in <foo:button> are not inherited to the <rect> because
'traitDef' element does NOT making attributes inheritable, BUT
exposing those to animation engine and DOM access.  If you change the
attribute in <foo:button>, it makes no effect to the button
presentation.  So this example is bad.

Best regards,

-- 
KONO Masahiko 
CANON INC.
E-mail : kono.masahiko@canon.co.jp
Received on Friday, 17 December 2004 08:01:57 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:29 GMT