svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3185 9038655c1b18
parent 3181 50d0fef791d5
child 3191 26b7c4aa7b38
equal deleted inserted replaced
3184:1d3408e46ab1 3185:9038655c1b18
  5518   <xsl:template mode="widget_defs" match="widget[@type='TextStyleList']">
  5518   <xsl:template mode="widget_defs" match="widget[@type='TextStyleList']">
  5519     <xsl:param name="hmi_element"/>
  5519     <xsl:param name="hmi_element"/>
  5520     <xsl:text>    styles: {
  5520     <xsl:text>    styles: {
  5521 </xsl:text>
  5521 </xsl:text>
  5522     <xsl:for-each select="$hmi_element/*[@inkscape:label]">
  5522     <xsl:for-each select="$hmi_element/*[@inkscape:label]">
  5523       <xsl:variable name="text" select="func:refered_elements(.)[self::svg:text][1]"/>
  5523       <xsl:variable name="style" select="func:refered_elements(.)[self::svg:text]/@style"/>
  5524       <xsl:variable name="tspan" select="$text/svg:tspan[1]"/>
       
  5525       <xsl:variable name="style">
       
  5526         <xsl:choose>
       
  5527           <xsl:when test="$text/@style and $tspan/@style">
       
  5528             <xsl:value-of select="$text/@style"/>
       
  5529             <xsl:text>;</xsl:text>
       
  5530             <xsl:value-of select="$tspan/@style"/>
       
  5531           </xsl:when>
       
  5532           <xsl:otherwise>
       
  5533             <xsl:value-of select="$text/@style"/>
       
  5534             <xsl:value-of select="$tspan/@style"/>
       
  5535           </xsl:otherwise>
       
  5536         </xsl:choose>
       
  5537       </xsl:variable>
       
  5538       <xsl:text>        </xsl:text>
  5524       <xsl:text>        </xsl:text>
  5539       <xsl:value-of select="@inkscape:label"/>
  5525       <xsl:value-of select="@inkscape:label"/>
  5540       <xsl:text>: "</xsl:text>
  5526       <xsl:text>: "</xsl:text>
  5541       <xsl:value-of select="$style"/>
  5527       <xsl:value-of select="$style"/>
  5542       <xsl:text>",
  5528       <xsl:text>",