Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xsl] Move (ascend) an element Move (ascend) an elementTo: Date: 7/1/2004 12:23:00 AM I'm trying to move the <indexterm> up in the tree, from: <figure> <title> <indexterm> <primary>special figure</primary> </indexterm> This is the figure caption text </title> </figure> to <figure> <indexterm> <primary>special figure</primary> </indexterm> <title>This is the figure caption text</title> </figure> I have code that does it part way, but won't handle any <secondary> elements that might also be contained within the <indexterm>: <xsl:template match="figure[descendant::title[descendant::indexterm]]"> <xsl:copy><indexterm><primary> <xsl:value-of select="descendant::indexterm"/></primary></indexterm> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <!-- remove old indexterm --> <xsl:template match="indexterm[ancestor::title[ancestor::figure]]"> </xsl:template> Is there some kind of value of select that will grab the <indexterm> and any elements under it, instead of me recreating them in my xsl? Any ideas. Thanks! Naomi __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
