Hi Ralf,
Ralf Siegel wrote:
Of course not, because the class selectors are applied using the stylesheet from svgB, not svg_A.
svg_B doesn't have a styleheet, so shouldn't the class selectors from svg_A apply?!
Well the short and stupid answer is because the SVG standard says they don't. The conceptual model is that all use references point to one instance (this is of course broken by the fact that properties inherit through the use). Sorry but what you are asking for doesn't exist in SVG currently.
Well, I read somewhere that CSS selectors won't get applied to *generated* content (which is what happens when the symbol 'button' is being cloned into the DOM tree of svgA), but how are you supposed to handle the use case above?
Put the definition of coolColor and hotColor in svgB
I don't want to ... ;o)
Actually I would like to define e.g. a button which consist of multiple parts (face, border, shadow, icon etc.), where each part comes with its own style, i.e. color. Then I'm going to (re)use that button definition in multiple SVGs, each SVG with a different stylesheet, i.e. different colors for those button parts - IMHO a common use case, no?
Common usecase or not you can't do it this way :( Have you ever heard of EcmaScript? ;)
The only way to implement this currently is to write an EcmaScript function that builds the button 'on the fly' (you could also do this with XSLT and build the entire document on the fly which was faster would probably depend on the amount of 'modified' content relative to static content). The Transcoders have an option to run 'onload' event handlers so you should be able to use that fairly easily.
Sorry,
ralf ...
------------------------------------------------------------- Ralf Siegel - Freelance Developer Recommended Listening: Broadcast - Haha Sound (Warp) contact_site: mailto:[EMAIL PROTECTED] -------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]