svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 2874 b67af0b8dc72
parent 2873 022db76c3bff
child 2875 6a12e1084deb
equal deleted inserted replaced
2873:022db76c3bff 2874:b67af0b8dc72
   213       <xsl:with-param name="parentpath">
   213       <xsl:with-param name="parentpath">
   214         <xsl:value-of select="$parentpath"/>
   214         <xsl:value-of select="$parentpath"/>
   215       </xsl:with-param>
   215       </xsl:with-param>
   216     </xsl:apply-templates>
   216     </xsl:apply-templates>
   217   </xsl:template>
   217   </xsl:template>
       
   218   <xsl:template mode="testtree" match="*">
       
   219     <xsl:param name="indent" select="''"/>
       
   220     <xsl:value-of select="$indent"/>
       
   221     <xsl:text> </xsl:text>
       
   222     <xsl:value-of select="local-name()"/>
       
   223     <xsl:text> </xsl:text>
       
   224     <xsl:for-each select="@*">
       
   225       <xsl:value-of select="local-name()"/>
       
   226       <xsl:text>="</xsl:text>
       
   227       <xsl:value-of select="."/>
       
   228       <xsl:text>" </xsl:text>
       
   229     </xsl:for-each>
       
   230     <xsl:text>
       
   231 </xsl:text>
       
   232     <xsl:apply-templates mode="testtree" select="*">
       
   233       <xsl:with-param name="indent">
       
   234         <xsl:value-of select="concat($indent,'&gt;')"/>
       
   235       </xsl:with-param>
       
   236     </xsl:apply-templates>
       
   237   </xsl:template>
       
   238   <xsl:template name="debug_hmitree">
       
   239     <xsl:text>Raw HMI tree
       
   240 </xsl:text>
       
   241     <xsl:apply-templates mode="testtree" select="$hmitree"/>
       
   242     <xsl:text>
       
   243 </xsl:text>
       
   244     <xsl:text>Indexed HMI tree
       
   245 </xsl:text>
       
   246     <xsl:apply-templates mode="testtree" select="$indexed_hmitree"/>
       
   247   </xsl:template>
   218   <func:function name="func:is_descendant_path">
   248   <func:function name="func:is_descendant_path">
   219     <xsl:param name="descend"/>
   249     <xsl:param name="descend"/>
   220     <xsl:param name="ancest"/>
   250     <xsl:param name="ancest"/>
   221     <func:result select="string-length($ancest) &gt; 0 and starts-with($descend,$ancest)"/>
   251     <func:result select="string-length($ancest) &gt; 0 and starts-with($descend,$ancest)"/>
   222   </func:function>
   252   </func:function>
   343       <xsl:call-template name="debug_geometry"/>
   373       <xsl:call-template name="debug_geometry"/>
   344       <xsl:text>
   374       <xsl:text>
   345 </xsl:text>
   375 </xsl:text>
   346     </xsl:comment>
   376     </xsl:comment>
   347     <xsl:comment>
   377     <xsl:comment>
   348       <xsl:apply-templates mode="testtree" select="$hmitree"/>
   378       <xsl:text>
   349     </xsl:comment>
   379 </xsl:text>
   350     <xsl:comment>
   380       <xsl:text>debug_hmitree:
   351       <xsl:apply-templates mode="testtree" select="$indexed_hmitree"/>
   381 </xsl:text>
       
   382       <xsl:call-template name="debug_hmitree"/>
       
   383       <xsl:text>
       
   384 </xsl:text>
   352     </xsl:comment>
   385     </xsl:comment>
   353     <xsl:comment>
   386     <xsl:comment>
   354       <xsl:text>Detachable :
   387       <xsl:text>Detachable :
   355 </xsl:text>
   388 </xsl:text>
   356       <xsl:for-each select="$detachable_elements">
   389       <xsl:for-each select="$detachable_elements">
  1466     <xsl:text>};
  1499     <xsl:text>};
  1467 </xsl:text>
  1500 </xsl:text>
  1468     <xsl:text>//})();
  1501     <xsl:text>//})();
  1469 </xsl:text>
  1502 </xsl:text>
  1470   </xsl:template>
  1503   </xsl:template>
  1471   <xsl:template mode="testtree" match="*">
       
  1472     <xsl:param name="indent" select="''"/>
       
  1473     <xsl:value-of select="$indent"/>
       
  1474     <xsl:text> </xsl:text>
       
  1475     <xsl:value-of select="local-name()"/>
       
  1476     <xsl:text> </xsl:text>
       
  1477     <xsl:for-each select="@*">
       
  1478       <xsl:value-of select="local-name()"/>
       
  1479       <xsl:text>="</xsl:text>
       
  1480       <xsl:value-of select="."/>
       
  1481       <xsl:text>" </xsl:text>
       
  1482     </xsl:for-each>
       
  1483     <xsl:text>
       
  1484 </xsl:text>
       
  1485     <xsl:apply-templates mode="testtree" select="*">
       
  1486       <xsl:with-param name="indent">
       
  1487         <xsl:value-of select="concat($indent,'&gt;')"/>
       
  1488       </xsl:with-param>
       
  1489     </xsl:apply-templates>
       
  1490   </xsl:template>
       
  1491   <xsl:template name="defs_by_labels">
  1504   <xsl:template name="defs_by_labels">
  1492     <xsl:param name="labels" select="''"/>
  1505     <xsl:param name="labels" select="''"/>
  1493     <xsl:param name="mandatory" select="'yes'"/>
  1506     <xsl:param name="mandatory" select="'yes'"/>
  1494     <xsl:param name="hmi_element"/>
  1507     <xsl:param name="hmi_element"/>
  1495     <xsl:variable name="widget_type" select="@type"/>
  1508     <xsl:variable name="widget_type" select="@type"/>