[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Move (ascend) an element

Subject: Re: Move (ascend) an element
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Thu, 1 Jul 2004 15:38:33 +0100
xsl move elements
Hi,
Out of interest, why do you want to move the elements ?

I havent lookd at your code,
but
<xsl:copy> does not do a deep copy..
try using <xsl:copy-of> this copies the nodes and its children to the result
tree
cheers
Vasu
----- Original Message ----- 
From: "Naomi Gronson" <naomi_gronson@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, July 01, 2004 3:22 PM
Subject:  Move (ascend) an element


> 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
>
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
>
>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.