Re: [xsl] Fwd: Moving an Element to new place/Element Reposition

Subject: Re: [xsl] Fwd: Moving an Element to new place/Element Reposition
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 10 Feb 2009 12:50:50 +0100
arut che wrote:

    I want to move an element(floats-second child of root) to last
child of body(third child of root element)  for this i am using the
following code:
<xsl:template match="body">
<xsl:apply-templates select="sections,acknowledgment,../floats"/>
</xsl:template>
The above code moves the floats element and transform as i defined.
But it is also alive & transformed at its original location too.

In the template of the root element make sure you do not process floats elements e.g.
<xsl:template match="/*">
<xsl:copy>
<xsl:apply-templates select="*[not(self::floats)]"/>
</xsl:copy>
</xsl:template>


If that does not help then please show a sample of your XML input document and also provide a sample of the XML result you want to create.

--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread