Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Rationale

Weblet XSL templates are heavily parameterized in order to give the WAM developer the ability to customize the results.

For example, the std_anchor weblet has the ability to change its appearance when the mouse hovers over it. To activate this behavior, the developer assigns a value to the mouseover_class property. The following XSLT is executed at runtime to see if the property has been set and, if so, adds onmouseover/onmouseout event handlers to the anchor:

 <xsl:if test="$mouseover_class != ''">     <xsl:attribute name="onmouseover">        <xsl:text>this.className='</xsl:text>        <xsl:value-of select="$mouseover_class" />        <xsl:text>'</xsl:text>     </xsl:attribute>     <xsl:attribute name="onmouseout">        <xsl:text>this.className='</xsl:text>        <xsl:value-of select="$class" />        <xsl:text>'</xsl:text>     </xsl:attribute>  </xsl:if>  

Once the WEBROUTINE design has been saved, the value of $mouseover_class never changes but this code is still executed every time the webroutine is run. If the weblet is in a list, the code is executed again for every row of the list.

...