Name

MailtoUsers

Dependencies

MailtoUser

Example

<xsl:call-template name="MailtoUsers">
  <xsl:with-param name="People" select="@Sales_x0020_Reps"/>
</xsl:call-template>

Code

<xsl:template name="MailtoUsers">
  <xsl:param name="People"/>
  <xsl:choose>
    <xsl:when test="contains($People, '&lt;tr&gt;')">
      <!-- Get the next User -->
          <xsl:call-template name="MailtoUser">
            <xsl:with-param name="Person" select="$People"/>
          </xsl:call-template>
      <!-- Add a separator if this isn't the last value -->
      <xsl:if test="string-length(substring-after(substring-after($People, '&lt;tr&gt;'), '&lt;tr&gt;')) &gt; 0 ">
        <xsl:text> </xsl:text>
      </xsl:if>
      <xsl:call-template name="MailtoUsers">
        <xsl:with-param name="People" select="substring-after($People, '&lt;/tr&gt;')"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <!-- Get the last UserID -->
      <xsl:call-template name="MailtoUser">
        <xsl:with-param name="Person" select="$People"/>
      </xsl:call-template>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Last edited May 29, 2010 at 2:14 AM by sympmarc, version 2

Comments

No comments yet.