Forum Moderators: open

Message Too Old, No Replies

ancestors or something

trying to reference an ancestor...need some help

         

cornelius

3:00 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Hi

if i have xml structured like this:

<grpform>
<title>
<head>
<heading>
<actions>

and in the xsl template i'm trying to edit, i am working in the template match="head/heading" section.

My question is how do i reference the title in this section.
Is there any way to do this?

thanx
Cor

choster

5:19 pm on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you mean your XML is structured like this?

<grpform> 
<title/>
<head>
<heading>
<heading>
</head>
<actions />
</grpform>

If so, <title> is a sibling of <head>, so

<xsl:template match="heading">
<h1><xsl:value-of select="../title" /></h1>
</xsl:template>