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

Re: xml to xml transformation

Subject: Re: xml to xml transformation
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 28 Apr 2003 19:11:36 -0400
Re:  xml to xml transformation
Steven,

Look up "identity transformation" (or just "identity transform") in the spec, the XSL FAQ, or the archives of this list. You want an extended version of it (the basic version just copies source to result).

To turn your attributes to elements, for example, you'll match the attributes with templates which instead of copying them (what the identity transform will generally do), creates elements with the same names as the attributes instead.

As for performance, sure, generally it'll be fine, unless you have very large batches or tiny pipes.

Write again if you get stuck.

Cheers,
Wendell

At 05:19 PM 4/28/2003, you wrote:
I need to do a minor transformation of large documents scheduled daily where the result will be the same as the original except one repeating element is transformed. What is the best way to transform just these elements while leaving the rest of the document the same? (I'm an xslt newbie by the way)
Is xslt appropriate performance wise?


Also, I haven't been able to get the transformation right. I need to take the value of an attribute and make it the element name as follows:

Transform:
<customFieldValue name="cust_1">Custom Field Value 1</customFieldValue>
<customFieldValue name="cust_2">Custom Field Value 2</customFieldValue>

To:
<cust_1>Custom Field Value 1</cust_1>
<cust_2>Custom Field Value 2</cust_2>


======================================================================
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
======================================================================


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.