svghmi/analyse_widget.xslt
changeset 4028 d9b772623fd9
parent 3920 0d491fada1ad
equal deleted inserted replaced
4027:59a331f80858 4028:d9b772623fd9
   243     <xsl:value-of select="@type"/>
   243     <xsl:value-of select="@type"/>
   244     <xsl:apply-templates mode="genlabel" select="arg"/>
   244     <xsl:apply-templates mode="genlabel" select="arg"/>
   245     <xsl:apply-templates mode="genlabel" select="path"/>
   245     <xsl:apply-templates mode="genlabel" select="path"/>
   246   </xsl:template>
   246   </xsl:template>
   247   <xsl:variable name="hmi_elements" select="//svg:*[starts-with(@inkscape:label, 'HMI:')]"/>
   247   <xsl:variable name="hmi_elements" select="//svg:*[starts-with(@inkscape:label, 'HMI:')]"/>
   248   <xsl:template match="widget[@type='AnimateRotation']" mode="widget_desc">
       
   249     <type>
       
   250       <xsl:value-of select="@type"/>
       
   251     </type>
       
   252     <longdesc>
       
   253       <xsl:text>AnimateRotation - DEPRECATED, do not use.
       
   254 </xsl:text>
       
   255       <xsl:text>Doesn't follow WYSIWYG principle, and forces user to add animateTransform tag in SVG (using inkscape XML editor for exemple)
       
   256 </xsl:text>
       
   257     </longdesc>
       
   258     <shortdesc>
       
   259       <xsl:text>AnimateRotation - DEPRECATED</xsl:text>
       
   260     </shortdesc>
       
   261     <path name="speed" accepts="HMI_INT,HMI_REAL">
       
   262       <xsl:text>speed</xsl:text>
       
   263     </path>
       
   264   </xsl:template>
       
   265   <xsl:template match="widget[@type='Assign']" mode="widget_desc">
   248   <xsl:template match="widget[@type='Assign']" mode="widget_desc">
   266     <type>
   249     <type>
   267       <xsl:value-of select="@type"/>
   250       <xsl:value-of select="@type"/>
   268     </type>
   251     </type>
   269     <longdesc>
   252     <longdesc>
   403     </arg>
   386     </arg>
   404     <path name="value" accepts="HMI_INT,HMI_REAL">
   387     <path name="value" accepts="HMI_INT,HMI_REAL">
   405       <xsl:text>Value to display</xsl:text>
   388       <xsl:text>Value to display</xsl:text>
   406     </path>
   389     </path>
   407   </xsl:template>
   390   </xsl:template>
   408   <xsl:template match="widget[@type='CircularSlider']" mode="widget_desc">
       
   409     <type>
       
   410       <xsl:value-of select="@type"/>
       
   411     </type>
       
   412     <longdesc>
       
   413       <xsl:text>CircularSlider - DEPRECATED, to be replaced by PathSlider
       
   414 </xsl:text>
       
   415       <xsl:text>This widget moves "handle" labeled group along "range" labeled
       
   416 </xsl:text>
       
   417       <xsl:text>arc, according to value of the single accepted variable.
       
   418 </xsl:text>
       
   419       <xsl:text>
       
   420 </xsl:text>
       
   421       <xsl:text>If "min" a "max" labeled texts are provided, or if first and second
       
   422 </xsl:text>
       
   423       <xsl:text>argument are given, then they are used as respective minimum and maximum
       
   424 </xsl:text>
       
   425       <xsl:text>value. Otherwise, value is expected to be in between 0 and 100.
       
   426 </xsl:text>
       
   427       <xsl:text>
       
   428 </xsl:text>
       
   429       <xsl:text>If "value" labeled text is found, then its content is replaced by value.
       
   430 </xsl:text>
       
   431       <xsl:text>During drag, "setpoint" labeled group is moved to position defined by user
       
   432 </xsl:text>
       
   433       <xsl:text>while "handle" reflects current value from variable.
       
   434 </xsl:text>
       
   435     </longdesc>
       
   436     <shortdesc>
       
   437       <xsl:text>CircularSlider - DEPRECATED</xsl:text>
       
   438     </shortdesc>
       
   439     <arg name="min" count="optional" accepts="int,real">
       
   440       <xsl:text>minimum value</xsl:text>
       
   441     </arg>
       
   442     <arg name="min" count="optional" accepts="int,real">
       
   443       <xsl:text>maximum value</xsl:text>
       
   444     </arg>
       
   445     <path name="value" accepts="HMI_INT,HMI_REAL">
       
   446       <xsl:text>Value to display</xsl:text>
       
   447     </path>
       
   448   </xsl:template>
       
   449   <xsl:template match="widget[@type='CustomHtml']" mode="widget_desc">
   391   <xsl:template match="widget[@type='CustomHtml']" mode="widget_desc">
   450     <type>
   392     <type>
   451       <xsl:value-of select="@type"/>
   393       <xsl:value-of select="@type"/>
   452     </type>
   394     </type>
   453     <longdesc>
   395     <longdesc>
   584       <xsl:text>Direct sub-elements can be either groups of widget to be spanned, labeled
   526       <xsl:text>Direct sub-elements can be either groups of widget to be spanned, labeled
   585 </xsl:text>
   527 </xsl:text>
   586       <xsl:text>"ClassName:offset", or buttons to control the spanning, labeled
   528       <xsl:text>"ClassName:offset", or buttons to control the spanning, labeled
   587 </xsl:text>
   529 </xsl:text>
   588       <xsl:text>"ClassName:+/-number".
   530       <xsl:text>"ClassName:+/-number".
       
   531 </xsl:text>
       
   532       <xsl:text>
       
   533 </xsl:text>
       
   534       <xsl:text>In case of "ClassName:offset", offset for first element is 1.
       
   535 </xsl:text>
       
   536       <xsl:text>
   589 </xsl:text>
   537 </xsl:text>
   590     </longdesc>
   538     </longdesc>
   591     <shortdesc>
   539     <shortdesc>
   592       <xsl:text>span widgets over a set of repeated HMI_NODEs</xsl:text>
   540       <xsl:text>span widgets over a set of repeated HMI_NODEs</xsl:text>
   593     </shortdesc>
   541     </shortdesc>
   925       <xsl:text>ScrollBar - svg:rect based scrollbar
   873       <xsl:text>ScrollBar - svg:rect based scrollbar
   926 </xsl:text>
   874 </xsl:text>
   927     </longdesc>
   875     </longdesc>
   928     <shortdesc>
   876     <shortdesc>
   929       <xsl:text>ScrollBar</xsl:text>
   877       <xsl:text>ScrollBar</xsl:text>
   930     </shortdesc>
       
   931     <path name="value" accepts="HMI_INT">
       
   932       <xsl:text>value</xsl:text>
       
   933     </path>
       
   934     <path name="range" accepts="HMI_INT">
       
   935       <xsl:text>range</xsl:text>
       
   936     </path>
       
   937     <path name="visible" accepts="HMI_INT">
       
   938       <xsl:text>visible</xsl:text>
       
   939     </path>
       
   940   </xsl:template>
       
   941   <xsl:template match="widget[@type='Slider']" mode="widget_desc">
       
   942     <type>
       
   943       <xsl:value-of select="@type"/>
       
   944     </type>
       
   945     <longdesc>
       
   946       <xsl:text>Slider - DEPRECATED - use ScrollBar or PathSlider instead
       
   947 </xsl:text>
       
   948     </longdesc>
       
   949     <shortdesc>
       
   950       <xsl:text>Slider - DEPRECATED - use ScrollBar instead</xsl:text>
       
   951     </shortdesc>
   878     </shortdesc>
   952     <path name="value" accepts="HMI_INT">
   879     <path name="value" accepts="HMI_INT">
   953       <xsl:text>value</xsl:text>
   880       <xsl:text>value</xsl:text>
   954     </path>
   881     </path>
   955     <path name="range" accepts="HMI_INT">
   882     <path name="range" accepts="HMI_INT">