svghmi/gen_dnd_widget_svg.xslt
branchwxPython4
changeset 3422 700b39cb4525
parent 3414 0ff608310312
child 3478 c04c6db09eff
child 3506 ca312be56929
equal deleted inserted replaced
3405:fdc12f7d27c8 3422:700b39cb4525
    18         <xsl:otherwise>
    18         <xsl:otherwise>
    19           <xsl:value-of select="$description"/>
    19           <xsl:value-of select="$description"/>
    20         </xsl:otherwise>
    20         </xsl:otherwise>
    21       </xsl:choose>
    21       </xsl:choose>
    22     </xsl:variable>
    22     </xsl:variable>
    23     <xsl:variable name="_type" select="substring-before($args,':')"/>
    23     <xsl:variable name="_typefreq" select="substring-before($args,':')"/>
       
    24     <xsl:variable name="typefreq">
       
    25       <xsl:choose>
       
    26         <xsl:when test="$_typefreq">
       
    27           <xsl:value-of select="$_typefreq"/>
       
    28         </xsl:when>
       
    29         <xsl:otherwise>
       
    30           <xsl:value-of select="$args"/>
       
    31         </xsl:otherwise>
       
    32       </xsl:choose>
       
    33     </xsl:variable>
       
    34     <xsl:variable name="freq" select="substring-after($typefreq,'|')"/>
       
    35     <xsl:variable name="_type" select="substring-before($typefreq,'|')"/>
    24     <xsl:variable name="type">
    36     <xsl:variable name="type">
    25       <xsl:choose>
    37       <xsl:choose>
    26         <xsl:when test="$_type">
    38         <xsl:when test="$_type">
    27           <xsl:value-of select="$_type"/>
    39           <xsl:value-of select="$_type"/>
    28         </xsl:when>
    40         </xsl:when>
    29         <xsl:otherwise>
    41         <xsl:otherwise>
    30           <xsl:value-of select="$args"/>
    42           <xsl:value-of select="$typefreq"/>
    31         </xsl:otherwise>
    43         </xsl:otherwise>
    32       </xsl:choose>
    44       </xsl:choose>
    33     </xsl:variable>
    45     </xsl:variable>
    34     <xsl:if test="$type">
    46     <xsl:if test="$type">
    35       <widget>
    47       <widget>
    37           <xsl:value-of select="$id"/>
    49           <xsl:value-of select="$id"/>
    38         </xsl:attribute>
    50         </xsl:attribute>
    39         <xsl:attribute name="type">
    51         <xsl:attribute name="type">
    40           <xsl:value-of select="$type"/>
    52           <xsl:value-of select="$type"/>
    41         </xsl:attribute>
    53         </xsl:attribute>
       
    54         <xsl:if test="$freq">
       
    55           <xsl:attribute name="freq">
       
    56             <xsl:value-of select="$freq"/>
       
    57           </xsl:attribute>
       
    58         </xsl:if>
    42         <xsl:for-each select="str:split(substring-after($args, ':'), ':')">
    59         <xsl:for-each select="str:split(substring-after($args, ':'), ':')">
    43           <arg>
    60           <arg>
    44             <xsl:attribute name="value">
    61             <xsl:attribute name="value">
    45               <xsl:value-of select="."/>
    62               <xsl:value-of select="."/>
    46             </xsl:attribute>
    63             </xsl:attribute>