Subject: Re: [xsl] question on preceding nodes From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 31 Mar 2003 19:12:53 -0500 |
<xsl:template match="C"> <xsl:value-of select="@name"/> <xsl:if test="preceding::C[@name=current()/@name]"> <xsl:text>_</xsl:text> <xsl:value-of select="../@number"/> </xsl:if> </xsl:template>
Cheers, Wendell
<xsl:template match="C"> <xsl:for-each select="C"> <xsl:choose> <xsl:when test="preceding::/*/*/C[@name=current()/@name]"> <xsl:value-of select="current()/@name"/>_<xsl:value-of select="../BOX/@number"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="current()/@name"/> </xsl:otherwise> </xsl:for-each> </xsl:template>
but this never produces the "_2" in "pen_2".
Any tip?
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] question on preceding nodes, Liao, John Teguh (Jo | Thread | [xsl] Creating a binary file, Hugh Dixon |
Re: [xsl] How do you set the action, Mike Brown | Date | Re: [xsl] Creating a binary file, G. Ken Holman |
Month |