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

transforming XML to XML with XSLT 1.0

Subject: transforming XML to XML with XSLT 1.0
From: "Mark Kersten" <markker83@xxxxxxxxxxx>
Date: Fri, 20 May 2005 15:53:51 +0200
xml to xml with xslt
Hi all,

I've got the following problem:

I need to transform data I get from a database in an XML document, to another better formed XML document.

This is the xml that I get from the database:

<oda>
<Row AID="CD46" GROUP_TYPE="08" GROUP_VERSION="A" TIMEOUT="2" SHORT_MESSAGE="0066" PORT_NR="1" ACCESS_RIGHT="0" />
<Row AID="CD46" GROUP_TYPE="08" GROUP_VERSION="A" TIMEOUT="2" SHORT_MESSAGE="0066" PORT_NR="2" ACCESS_RIGHT="0" />
<Row AID="CD46" GROUP_TYPE="08" GROUP_VERSION="A" TIMEOUT="2" SHORT_MESSAGE="6280" PORT_NR="3" ACCESS_RIGHT="1" />
</oda>


And this is how it has to look like after the XSLT transformation:

<oda>
 <aid>CD46</aid>
<group>
 <type>08</type>
 <version>A</version>
 </group>
 <timeout>2</timeout>
 <shortmessage>0066</shortmessage>
 <shortmessage>6280</shortmessage>
<odaaccessrights>
<portaccess>
 <number>1</number>
 <enabled>0</enabled>
 </portaccess>
<portaccess>
 <number>2</number>
 <enabled>0</enabled>
 </portaccess>
<portaccess>
 <number>3</number>
 <enabled>1</enabled>
 </portaccess>
 </odaaccessrights>
</oda>

I've tried numerous solutions also listed on http://gandhimukul.tripod.com/grouping.html but I can't get any to work properly.

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.