xsl-list
[Top] [All Lists]

Re: check parent node

2003-04-28 15:51:51
How about...

<xsl template match="row">
  <xsl:if test="parent::column">
    <!-- Do your stuff -->
  </xsl:if>
</xsl:template>


/Marcus

----- Original Message ----- 
From: "Mark Ivs" <markivs2003(_at_)yahoo(_dot_)com>
To: <XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, April 29, 2003 12:15 AM
Subject: [xsl] check parent node


In the xml I have row node which is inside column node
in some cases.
In xsl what is the most efficient way to check if the
row node is a child of column ?

Thanks for the help.

Mark

<home>
<row>
<column>
  some data
</column>
</row>
<row>
  <column>
    <row>
<column>
   some data
</column>
<column>
   some data
</column> 
    </row>
  </column>
</row>
</home>

<xsl template match="row">
how do I check if the row is a child of column ?
</xsl:template>

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>