- From: Steve Dickson <sdickson@savagesoftware.com>
- Date: Mon, 05 Jun 2000 13:41:30 -0700
- To: www-svg@w3.org
I'd like some clarification about the use of CSSValue types in Exchange SVG. According to section 24.5 of the SVG spec of 2000/03/03, Exchange SVG defines a number of attributes of type CSSValue. e.g. attribute CSSValue fill-opacity; Since this is not a read-only attribute, it should have a mutator/set method as well as an accessor/get method. The set method presumably takes a user-created CSSValue as an input parameter. My question is: how is the user supposed to create a CSSValue object to pass in to the set method? From what I've been able to determine from reading the CSS spec, there are no factory methods for CSSValue. It seems that the only way to get a handle on a CSSValue object is to do something like the following: [Assuming you have a DOMImplementationCSS variable created called "impl".] CSSStyleSheet s = impl.createCSSStyleSheet("",""); s.insertRule("{fill-opacity: 1.0}"); CSSStyleRule sr = (CSSStyleRule)s.getCSSRules().item(0); CSSValue fill_opacity = sr.getStyle().getPropertyCSSValue("fill-opacity"); I must be missing something, since this doesn't seem viable in the context of Exchange SVG for two reasons: (1) one of the main purposes of Exchange SVG was to get away from the need for style sheets; (2) it seems to place an awful burden on the user just to create a simple object. Is there a better (simpler, more lightweight, user-friendly) way to create a CSSValue object for use in Exchange SVG? S.
Received on Monday, 5 June 2000 16:41:25 UTC