This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: efficiency


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@mulberrytech.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]