Subject: Re: [xsl] Re: Move (ascend) an element From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 10 Nov 2004 13:23:57 -0500 |
I'm trying to retain the original attributes from the figure match and the following code seems to work, although I haven't seen many instances with two copy-of's in a row--do you know if this is okay practice?:
<xsl:template match="figure[./title/indexterm]"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:copy-of select=".//indexterm"/> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template>
It seems preferable than recreating each attribute (some are custom) with the <attribute> tag.
Cheers, Wendell
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: Move (ascend) an elem, Naomi Gronson | Thread | [xsl] Create a bit mask ?, Saba |
Re: [xsl] variable question, Wendell Piez | Date | [xsl] XPath to match attribute with, Matt Dittbenner |
Month |