One of the things that was done when incorporating an earlier version of
Chiba into NetKernel was to add the id of the xform control as the class
attribute of the various html controls output by html-form-controls.xsl. In
moving to the latest release of Chiba it was noticed that this area had
been completely reworked and a case statement added to control the setting
of the class attribute. The default of this case statement is to set the
class attribute to a generic widget name, such as input-widget, i.e.
....
<xsl:otherwise>
<xsl:attribute name="class">input-widget</xsl:attribute>
</xsl:otherwise>
I wonder if we could change that to be both the id and the widget name i.e.
<xsl:otherwise>
<xsl:attribute name="class">
<xsl:value-of select="concat(@id, ' ','input-widget')"/>
</xsl:attribute>
</xsl:otherwise>
This change allows css to be associated with both a generic widget type and
a specific instance of that widget and as such would allow backward
comparability with existing implementations using Chiba and NetKernel as
well as reducing the amount of effort required to keep NetKernel in sync
with Chiba. Also, I think it is consistent with the other options which use
a combination of the repeat-id or the specified class attribute and the
widget type as illustrated below:
<xsl:choose>
<xsl:when test="boolean(string-length($repeat-id) > 0)">
<xsl:attribute name="class">
<xsl:value-of select="concat($repeat-id,'-',$pos,'
input-widget')"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="boolean(string-length(@class) > 0)">
<xsl:attribute name="class">
<xsl:value-of select="concat(@class, '
','input-widget')"/>
</xsl:attribute>
</xsl:when>
....
Thoughts?
Robert
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 5/03/2004
|