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

Transforming node to different location in output

Subject: Transforming node to different location in output
From: Jonathan Schroeder <jschroeder_1998@xxxxxxxxx>
Date: Wed, 19 Apr 2000 09:00:48 -0700 (PDT)
jonathan schroeder
Can anyone help me figure out how to transform one
node to a different location in the output, while
simply copying the rest of the nodes as is
to the output? Right now, I can rename a node, but am
interested in placing it in a different location in
the output (this could be either at the same level, or
within another node).

Example:
Input:
<?xml version="1.0"?>
<document>
  <tag1>
    <element1>data</element1>
    <element2>data</element2>
  </tag1>
  <tag2>
    <element1>data</element1>
    <element2>data</element2>
  </tag2>
  <tag3>
    <element1>data</element1>
    <element2>data</element2>
  </tag3>
</document>

Output:
<?xml version="1.0" encoding="utf-8"?>
<document>
   <newtag1>
      <newelement1>data</newelement1>
      <newelement2>data</newelement2>
   </newtag1>
   <tag2>
      <element1>data</element1>
      <element2>data</element2>
   </tag2>
   <tag3>
      <element1>data</element1>
      <element2>data</element2>
   </tag3>
</document>

The output that I would like to get might be something
like this:

<?xml version="1.0" encoding="utf-8"?>
<document>
   <tag2>
      <element1>data</element1>
      <element2>data</element2>
   </tag2>
   <tag3>
      <element1>data</element1>
      <element2>data</element2>
      <newtag1>
         <newelement1>data</newelement1>
         <newelement2>data</newelement2>
      </newtag1>
   </tag3>
</document>

Any help would be greatly appreciated!

Thanks.

Jonathan


__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com


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


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.