locating child nodes sibling

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Locked
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

locating child nodes sibling

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Locked