I have a couple of tagfiles that generate form elements with specific conventions for the 'name' and 'value' attribute. Basically, a data binding framework.
Dynamic attributes are useful because you can delegate all the usual html attributes the the generated HTML form element: SELECT, INPUT etc.
The usual way to do this is to concatenate all the "pass-through" attributes to a spring, and append this string to the element generated:
I'm wondering how to do this in a tagfile in XML format (mytag.tagx), since the XML format forbids something like the example above.
There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
I know that XSLT includes an <xsl:attribute-set> element where you can predefine a set of attributes (e.g. 'name' and 'value'), plus a 'use-attribute-sets' attribute on the <xsl:element> element where you can add those attributes to a particular element.
Now if you could just work an XSL transformation step into your processing at the right time, this might be the basis of a solution.