svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3116 6da94ec04325
parent 3112 bd20f9112014
child 3118 e704b0487515
equal deleted inserted replaced
3115:77cfbf1aacf0 3116:6da94ec04325
   262       <xsl:value-of select="local-name()"/>
   262       <xsl:value-of select="local-name()"/>
   263       <xsl:text>="</xsl:text>
   263       <xsl:text>="</xsl:text>
   264       <xsl:value-of select="."/>
   264       <xsl:value-of select="."/>
   265       <xsl:text>" </xsl:text>
   265       <xsl:text>" </xsl:text>
   266     </xsl:for-each>
   266     </xsl:for-each>
   267     <xsl:text>
   267     <xsl:text> [</xsl:text>
       
   268     <xsl:value-of select="text()"/>
       
   269     <xsl:text>]
   268 </xsl:text>
   270 </xsl:text>
   269     <xsl:apply-templates mode="testtree" select="*">
   271     <xsl:apply-templates mode="testtree" select="*">
   270       <xsl:with-param name="indent">
   272       <xsl:with-param name="indent">
   271         <xsl:value-of select="concat($indent,'&gt;')"/>
   273         <xsl:value-of select="concat($indent,'&gt;')"/>
   272       </xsl:with-param>
   274       </xsl:with-param>
   957     <xsl:text> */
   959     <xsl:text> */
   958 </xsl:text>
   960 </xsl:text>
   959     <xsl:text>
   961     <xsl:text>
   960 </xsl:text>
   962 </xsl:text>
   961     <xsl:variable name="translations" select="ns:GetTranslations($translatable_strings)"/>
   963     <xsl:variable name="translations" select="ns:GetTranslations($translatable_strings)"/>
   962     <xsl:text>var translations = {
   964     <xsl:text>var langs = [</xsl:text>
   963 </xsl:text>
   965     <xsl:for-each select="$translations/langs/lang">
   964     <xsl:for-each select="$translations/*">
   966       <xsl:value-of select="."/>
   965       <xsl:text>    "</xsl:text>
   967       <xsl:if test="position()!=last()">
   966       <xsl:value-of select="local-name()"/>
   968         <xsl:text>,</xsl:text>
   967       <xsl:text>":{
   969       </xsl:if>
   968 </xsl:text>
   970     </xsl:for-each>
   969       <xsl:text>    }</xsl:text>
   971     <xsl:text>];
       
   972 </xsl:text>
       
   973     <xsl:text>var translations = [
       
   974 </xsl:text>
       
   975     <xsl:for-each select="$translatable_texts">
       
   976       <xsl:variable name="n" select="position()"/>
       
   977       <xsl:text>  ["</xsl:text>
       
   978       <xsl:value-of select="@id"/>
       
   979       <xsl:text>",[</xsl:text>
       
   980       <xsl:for-each select="$translations/messages/msgid[$n]/msg">
       
   981         <xsl:text>"</xsl:text>
       
   982         <xsl:for-each select="line">
       
   983           <xsl:value-of select="."/>
       
   984           <xsl:if test="position()!=last()">
       
   985             <xsl:text>\n</xsl:text>
       
   986           </xsl:if>
       
   987         </xsl:for-each>
       
   988         <xsl:text>"</xsl:text>
       
   989         <xsl:if test="position()!=last()">
       
   990           <xsl:text>,</xsl:text>
       
   991         </xsl:if>
       
   992       </xsl:for-each>
       
   993       <xsl:text>]]</xsl:text>
   970       <xsl:if test="position()!=last()">
   994       <xsl:if test="position()!=last()">
   971         <xsl:text>,</xsl:text>
   995         <xsl:text>,</xsl:text>
   972       </xsl:if>
   996       </xsl:if>
   973       <xsl:text>
   997       <xsl:text>
   974 </xsl:text>
   998 </xsl:text>
   975     </xsl:for-each>
   999     </xsl:for-each>
   976     <xsl:text>};
  1000     <xsl:text>]
   977 </xsl:text>
       
   978     <xsl:text>
       
   979 </xsl:text>
  1001 </xsl:text>
   980     <xsl:text>
  1002     <xsl:text>
   981 </xsl:text>
  1003 </xsl:text>
   982   </xsl:template>
  1004   </xsl:template>
   983   <xsl:template mode="hmi_widgets" match="svg:*">
  1005   <xsl:template mode="hmi_widgets" match="svg:*">