Re: [xsl] efficiency

Subject: Re: [xsl] efficiency
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 26 Mar 2002 14:47:45 -0500
David,

At 02:34 PM 3/26/2002, you wrote:
Is there a more efficient way of doing this:

Yes:


<xsl:for-each select="Memos/Memo[position() &gt; 1]">
  <xsl:text>88,</xsl:text>
  <xsl:value-of select="."/>
</xsl:for-each>

Just as you thought. The first Memo doesn't get selected even if it's the only one.

Cheers,
Wendell

<xsl:if test="count(Memos/Memo) &gt; 1">

<xsl:for-each select="Memos/Memo">

<xsl:if test="position() &gt; 1"><xsl:text>88,</xsl:text><xsl:value-of
select="."/></xsl:if>

</xsl:for-each>

</xsl:if>

It's effective, but I would think I could do this in a predicate for the
select in the for-each.  Thanks. :)


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread