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

Followup question about transforming node location

Subject: Followup question about transforming node location
From: Jonathan Schroeder <jschroeder_1998@xxxxxxxxx>
Date: Thu, 27 Apr 2000 09:40:12 -0700 (PDT)
xsl node location
As a long Easter weekend delayed my response to Mike's
helpful reply, I am reposting my followup question:


Thanks for your help! I think I now have a better
understanding of when to use copy, copy-of and

I was wondering if you might be able to provide some
additional guidance. I am trying to do a
transformation (slightly different from the one
described in my previous post) by renaming a node and
its children and moving this newly named node to a
particular location in the output. I know the element
that will precede the intended output location, but
the elements before this element can vary. The
following XSL (I modified slightly the XSL you
provided) renames and moves the node as desired, but I
am looking to change the <xsl:copy-of select="tag2"/>
to something more generic, so that I can copy
everything (except tag1) as is and then once I have
copied tag2 to the output, tag1 will be transformed
through a template. The copying will then resume
generically for the rest of the document, as the
subsequent elements may vary.

<xsl:template match="document">
  <xsl:copy-of select="tag2"/>
  <xsl:apply-templates select="tag1"/>
  <xsl:copy-of select="tag3"/>    

<xsl:template match="tag1">

<xsl:template match="element1">

<xsl:template match="element2">

I would like to take this input:

and create the output:

Any help is much appreciated.


Do You Yahoo!?
Talk to your friends online and get email alerts with Yahoo! Messenger.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.