XSLTools

Change of XSLForms/XSL/QtDesigner.xsl

371:f2710049be3e
XSLForms/XSL/QtDesigner.xsl
     1.1 --- a/XSLForms/XSL/QtDesigner.xsl	Mon Oct 31 23:59:56 2005 +0000
     1.2 +++ b/XSLForms/XSL/QtDesigner.xsl	Tue Nov 01 16:47:22 2005 +0000
     1.3 @@ -238,8 +238,21 @@
     1.4    <xsl:template match="widget[@class='QPushButton']">
     1.5      <input xmlns="http://www.w3.org/1999/xhtml" type="submit">
     1.6        <xsl:variable name="name-prop" select="property[@name='name']"/>
     1.7 +      <xsl:variable name="field-name" select="$name-prop/cstring/text()"/>
     1.8        <xsl:variable name="value-prop" select="property[@name='text']"/>
     1.9 -      <xsl:attribute name="template:selector-field"><xsl:value-of select="$name-prop/cstring/text()"/></xsl:attribute>
    1.10 +      <xsl:choose>
    1.11 +        <xsl:when test="starts-with($field-name, 'add_')">
    1.12 +          <xsl:variable name="affected-element" select="substring-after($field-name, 'add_')"/>
    1.13 +          <xsl:attribute name="template:selector-field"><xsl:value-of select="$field-name"/>,<xsl:value-of select="$affected-element"/></xsl:attribute>
    1.14 +        </xsl:when>
    1.15 +        <xsl:when test="starts-with($field-name, 'remove_')">
    1.16 +          <xsl:variable name="affected-element" select="substring-after($field-name, 'remove_')"/>
    1.17 +          <xsl:attribute name="template:selector-field"><xsl:value-of select="$field-name"/>,<xsl:value-of select="$affected-element"/></xsl:attribute>
    1.18 +        </xsl:when>
    1.19 +        <xsl:otherwise>
    1.20 +          <xsl:attribute name="template:selector-field"><xsl:value-of select="$field-name"/></xsl:attribute>
    1.21 +        </xsl:otherwise>
    1.22 +      </xsl:choose>
    1.23        <xsl:attribute name="name"><xsl:value-of select="$name-prop/cstring/text()"/></xsl:attribute>
    1.24        <xsl:attribute name="value"><xsl:value-of select="$value-prop/string/text()"/></xsl:attribute>
    1.25      </input>