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]

RE: for-each sort of thing in {} ?


On Thu, 8 Jun 2000, Ben Robb wrote:
> <xsl:template match="foo">
> <xsl:variable name="qstring">
> 	<xsl:for-each select="bar">
> 		<xsl:if test="postition() != 1">
> 			&amp;
> 		</xsl:if>
> 		id<xsl:value-of select="position()"/>=<xsl:value-of
> select="@id"/>
> 	</xsl:for-each>
> </xsl:variable>
> </xsl:template>

Ben,
  Thanks very, very much. Duh, of course a variable is the solution.
However, one has to change the content of the XSL:FOR-EACH element to:
<xsl:if test="position() != 1">&amp;</xsl:if>id<xsl:value-of select="position()"/>=<xsl:value-of select="@id"/>
 
so that the whitespace does not become part of the element.
- - - - - - - - - - - - - - - - - - - - - - - - - - - 
  Carole E. Mah                Carole_Mah@Brown.edu
              Senior Programmer/Analyst
    Brown University Scholarly Technology Group
                  phn 401-863-2669
                  fax 401-863-9313
              http://www.stg.brown.edu/
personal: http://www.stg.brown.edu/staff/carole.html




 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]