From: Robin B. <ro...@kn...> - 2001-09-28 15:50:09
|
On Friday 28 September 2001 17:35, Antoine Quint wrote: > Well, it's good to have these too. s/good/vital/ ;-) > My example is not simply shortcut to > your piece of code. It is a shortcut in that that's what would happen internally if you fed it a string. > We need a Create* method taking a string as a > parameter so that any string, possibly one read in a non-"style" > attribute like in iDrag, can benefit from the CSSStyleDeclaration > interface. It would allow us for parsing such a string, your example > relies on the string being parsed already really. But what's in your > example is required too since we need to be able to create style objects > in such a verbose way too. Yes, I know your needs Antoine, and I agree. If this were my implementation in a sane language (ie that either doesn't have method signatures OR has them _and_ multiple dispatch, anything in the middle being just plain stupid) it would happen this way. However in this context I doubt that there will be a createCSSStyleDeclaration() and a createCSSStyleDeclarationFromString(string). The talk that's going on right now seems to imply that parsing facilities may be made available (eg parseCSSStyleDeclaration as it exists in SAC: http://search.cpan.org/doc/RBERJON/CSS-SAC-0.03/SAC.pm , I keep referring to my module for the spec but that's because the spec is quasi inexistant) in which case you could do what you do with a stream model and without touching the actual object model (which would be a problem). Another solution that I've been thinking about is a way to tell the host DOM that a given attribute is a style holding attribute. Yes, this should have made it into XSchema but they preferred to fuck with namespaces instead and leave us with a number of awful things. It might be in XSD 1.1 though (xing fingers...). In any case a way to set it from the DOM would be great. -- _______________________________________________________________________ Robin Berjon <ro...@kn...> -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com ----------------------------------------------------------------------- Forty two. |