Page 1 of 1

locating child nodes sibling

Posted: Thu Jan 15, 2004 2:08 pm
by kendall
hello,

i have the following xsl sheet that on and if statement builds a dynamic path link

Code: Select all

<xsl:template match="song">
	<li>
		<xsl:value-of select="song"/><xsl:apply-templates/>
		<xsl:if test="@PLAY='true'">
			<a>
			<xsl:attribute name="href">
				<xsl:text>albums/</xsl:text>
				<xsl:value-of select="&#123;image/@src&#125;"/> // note
				<xsl:text>/track</xsl:text>
				<xsl:value-of select="@number"/>
				<xsl:text>.ram</xsl:text>
			</xsl:attribute>
			<xsl:text>WIN</xsl:text>
			</a>
		</xsl:if>
	</li>
</xsl:template>
note the
<xsl:value-of select="{image/@src}"/> // note
im trying here to get the value of the <song> sibling tag <image src="" /> attribute value (src)

how do i write the syntax for this

Kendall

Posted: Fri Jan 16, 2004 5:23 am
by twigletmac
This is confusing - you had three topics all about the same thing :| I've replied to the first, deleted another which was a copy of this and then realised that you have moved along with your code but instead of posting it to the initial thread have started another.

The answer to your question is in the thread I replied to. I'm locking this one, you can continue everything in the original thread.

Mac