[Home] [By Thread] [By Date] [Recent Entries]
Katharine,
Another approach (besides the ones using for-each) is just to use the built-in descent of the tree, as in something like: <xsl:template match="menu">
<xsl:if select="ancestor::menu[@id=$id']">
<xsl:value-of select="@id"/>
<!-- copies out this menu's @id if it has an ancestor
menu with @id = $id -->
</xsl:if>
<xsl:apply-templates/>
<!-- continues the tree traversal in case there are any below -->
</xsl:template>Make sure the parameter is set to the *value* of the id ('1', '6', whatever) whose descendants you want. Cheers, Wendell At 10:51 AM 8/30/2002, you wrote: Thanks for that. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



