W3C home > Mailing lists > Public > www-svg@w3.org > March 2000

SVG attribute names

From: Steve Dickson <sdickson@savagesoftware.com>
Date: Wed, 08 Mar 2000 11:18:32 -0800
Message-id: <fc.0085846d00001c050085846d00001c05.1c0e@savagesoftware.com>
To: www-svg@w3.org

Many of the Exchange SVG attribute names contain a '-' character eg.
fill-opacity, stroke-width.  This will complicate implementation somewhat,
since many programming languages do not allow the '-' character in
variable or function names; the character is interpreted as a minus sign. 
This forces implementers to rename problematic attributes and their
associated get/set functions.  As a concrete example, one implementer may
choose to rename fill-opacity to fill_opacity, while another may choose
fillOpacity.  The associated get functions would become getFill_opacity()
and getFillOpacity() respectively.  

The end result is unnecessarily divergent interfaces, which seems contrary
to the philosophy of standardisation. 

A similar problem arises with the SVGFECompositeElement::operator
attribute; in this case, operator is a reserved word.

Rather than force the implementer into renaming attributes, could you
adopt a more rigorous naming convention that recognizes these potential
problems?
Received on Wednesday, 8 March 2000 14:18:21 GMT

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