Deb Lewis
2006-Sep-18 17:37 UTC
[Masterview-devel] Thoughts on directives: attr_arg and related services
RE: :merge option name is confusing ah, right, just found my note-to-self with an idea for alt names for this. Maybe call this option :element_attrs, that''s more explicit and conveys some sense of what''s being added. Option value is one or more element names, including reserved name :common_html; maybe also an :all value? Side comment: the current impl of :common_html is kind of funky IMO - muddles standard attributes with random subsets from images, tables,.... Would rather be a bit more explicit and tie attribute-set names to the standards. Universal attributes (?:standard_html?) are id, name, class, style. Then maybe we define explicit sets for elements of interest: images, links, stylesheets, tables, e.g., :image_attrs are alt, title, and the old-compat attrs width/height. Not sure how far to go with this, at some point you end up building a tag => attr_names map from the xhtml spec so you can say "gimme all the relevant attributes for a Foo element", and that seems like overkill. So this could be one of those ideas that deserves to be killed off promptly. ~ Deb
Jeff Barczewski
2006-Sep-18 20:12 UTC
[Masterview-devel] Thoughts on directives: attr_arg and related services
On 9/18/06, Deb Lewis <djlewis at acm.org> wrote:> RE: :merge option name is confusing > > ah, right, just found my note-to-self with an idea for alt names for this. > Maybe call this option :element_attrs, that''s more explicit and conveys some > sense of what''s being added. Option value is one or more element names, > including reserved name :common_html; maybe also an :all value?Sure, if :element_attrs seems clearer than :merge then we can do that. I am fine with having a :common_html and maybe an :all. Maybe :all does everything and :common_html does only things that are truly common across html? I started out with common only being fairly common things, but then started wondering what the harm of including the others would be. They probably wouldn''t exist unless they were applicable. We could use :all for this and back :common_html down to smaller subset. I was just trying to make things easier and simpler. Unless I ran into an area where one of the attributes was going to cause a problem then I would probably use the all method for simplicity. Or should :all actually do all attribues not just ones define in xhtml? Should we have :all_xhtml_11 ?> > Side comment: the current impl of :common_html is kind of funky IMO - > muddles standard attributes with random subsets from images, tables,.... > Would rather be a bit more explicit and tie attribute-set names to the > standards. Universal attributes (?:standard_html?) are id, name, class, > style. Then maybe we define explicit sets for elements of interest: images, > links, stylesheets, tables, e.g., :image_attrs are alt, title, and the > old-compat attrs width/height. > > Not sure how far to go with this, at some point you end up building a tag => > attr_names map from the xhtml spec so you can say "gimme all the relevant > attributes for a Foo element", and that seems like overkill. So this could > be one of those ideas that deserves to be killed off promptly. >Yeah, I think we can build it if we need it. YNGNI (as you were telling me).