svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3175 b2ba6eeb61ec
parent 3170 aaa203270ab0
child 3178 21cb76012c78
equal deleted inserted replaced
3174:bc4194b73438 3175:b2ba6eeb61ec
  5511   <xsl:template mode="widget_defs" match="widget[@type='TextStyleList']">
  5511   <xsl:template mode="widget_defs" match="widget[@type='TextStyleList']">
  5512     <xsl:param name="hmi_element"/>
  5512     <xsl:param name="hmi_element"/>
  5513     <xsl:text>    styles: {
  5513     <xsl:text>    styles: {
  5514 </xsl:text>
  5514 </xsl:text>
  5515     <xsl:for-each select="$hmi_element/*[@inkscape:label]">
  5515     <xsl:for-each select="$hmi_element/*[@inkscape:label]">
  5516       <xsl:variable name="style" select="func:refered_elements(.)[self::svg:text]/@style"/>
  5516       <xsl:variable name="text" select="func:refered_elements(.)[self::svg:text][1]"/>
       
  5517       <xsl:variable name="tspan" select="$text/svg:tspan[1]"/>
       
  5518       <xsl:variable name="style">
       
  5519         <xsl:choose>
       
  5520           <xsl:when test="$text/@style and $tspan/@style">
       
  5521             <xsl:value-of select="$text/@style"/>
       
  5522             <xsl:text>;</xsl:text>
       
  5523             <xsl:value-of select="$tspan/@style"/>
       
  5524           </xsl:when>
       
  5525           <xsl:otherwise>
       
  5526             <xsl:value-of select="$text/@style"/>
       
  5527             <xsl:value-of select="$tspan/@style"/>
       
  5528           </xsl:otherwise>
       
  5529         </xsl:choose>
       
  5530       </xsl:variable>
  5517       <xsl:text>        </xsl:text>
  5531       <xsl:text>        </xsl:text>
  5518       <xsl:value-of select="@inkscape:label"/>
  5532       <xsl:value-of select="@inkscape:label"/>
  5519       <xsl:text>: "</xsl:text>
  5533       <xsl:text>: "</xsl:text>
  5520       <xsl:value-of select="$style"/>
  5534       <xsl:value-of select="$style"/>
  5521       <xsl:text>",
  5535       <xsl:text>",