Marc Portier wrote:
none,
just had one spontanuos thought:
maybe we can reduce typing somewhat if we add those attributes by using a different namespace (rather then, the default one which seems to be so commong for attributes)
(possibly reusing 'fd', or introducing 'fa' for form-atributes)
your sample would become: <fd:field id="foo" fa:bar="baz"> ... </fd:field>
as said: just a thought
Interesting thought. It surely saves some keystrokes, but introduces yet another namespace in CForms, and I'm afraid it may confuse users.
So I think I'll favour clarity to terseness (remember, it's one of the 10 design goals of XML [1]).
Sylvain
[1] http://www.w3.org/TR/1998/REC-xml-19980210#sec-origin-goals
-marc=
Sylvain Wallez wrote:
Hi all,
CForms widget currently support attributes (get/setAttribute methods), but these can only be set programmatically.
I'd like to add the possibility to set attributes in form definitions, e.g.
<fd:field id="foo">
<fd:attribute name="bar" value="baz"/>
.../...
</fd:field>
The purpose is to use attributes as tags (or metadata) that can be handled by some generic form handling code.
Any objection for this?
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }