Hi All,
I am having trouble selecting a node with xpath. I hope someone can help. Here is my xml sample:
Code:
<Book>
<Chapter>
<revNumber>
<number>03</number>
</revNumber>
<RevDate>
<date>2006-09-12 </date>
</RevDate>
<Sec1/>
<Sec1>
<Para>
<Bullet1>
<Para id="chg3">Administrator</Para>
</Bullet1>
</Para>
<Title>REVISIONS:</Title>
</Sec1>
</Chapter>
</Book>
I want to grab the value of 'Title'. I tried the following to grab the title if the Para ID='chg3':
<xsl:for-each select="//JBU:Para[@id='chg3']">
<xsl:variable name="sectiontitle" select="../JBU:Title"/>
<xsl:variable name="oldtext" select="."/>
<td>
<xsl:value-of select="$oldtext"/>
</td>
<td>
<xsl:value-of select="$sectiontitle"/>
</td>
</xsl:for-each>
I do not return a value. However if Para is a direct child of of Sec1, it returns a value.
Thanks for the help.
Bones