XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Selva Kumar.T.PSubject: Convert XML to XML usig XSLT
Author: Selva Kumar.T.P
Date: 19 Oct 2006 12:55 AM
Hi folks, I am Selva Kumar...
I want the Small Coding for convert xml to xml using xslt..

I need an xslt document that can tranform the following xml into the second

A) input

<TOPOBJECT>
<NODEA ID='781'>A</NODEA>
<nodeb ID='785'>B</nodeb>
<nodec ID='782'>C</nodec>
<bignodes ID='89' inDX='100' outDX='55' dir='left'>
<ccua ID='12'>cc 1</ccua>
<dcc ID='67' x='zone'>bA1</dcc>
<dcc ID='68' x='zone'>bA2</dcc>
<dcc ID='680' x='zone'>bA3</dcc>
</bignodes>
<bignodes ID='893' inDX='100' outDX='52' dir='left'>
<ccua ID='123'>super cc</ccua>
<dcc ID='673' x='zone' value='5'>bB1</dcc>
<dcc ID='683' x='zone'>bB2</dcc>
<dcc ID='6803' x='zone'value='-99'>bB3</dcc>
</bignodes>
<bignodes ID='894' inDX='101' outDX='90' dir='left'>
<ccua ID='124'>bA</ccua>
<dcc ID='674' x='zone'>bC1</dcc>
<dcc ID='684' x='zone'>bC2</dcc>
<dcc ID='6804' x='zone'>bC3</dcc>
</bignodes>
</TOPOBJECT>

B) output

<TOPOBJECT>
<NODEA ID='781'>A</NODEA>
<nodeb ID='785'>B</nodeb>
<nodec ID='782'>C</nodec>
<bignodes ID='89' inDX='100' outDX='2000' dir='left'>
<ccua ID='12'>super cc</ccua>
<dcc ID='67' x='zone' value='20'>bA1</dcc>
<dcc ID='68' x='zone'>bA2</dcc>
<dcc ID='680' x='zone'>bA3</dcc>
</bignodes>
<bignodes ID='894' inDX='101' outDX='90' dir='left'>
<ccua ID='124'>bA</ccua>
<dcc ID='674' x='zone'>bC1</dcc>
<dcc ID='684' x='zone'>bC2</dcc>
<dcc ID='6804' x='zone'>bC3</dcc>
</bignodes>
</TOPOBJECT>


English instructions would be

deep copy the entire structure however:
if there is a bignodes whose ccua field contains the string 'cc' do the following
1) if ccua = "cc 1" discard that node
2) else
2a) change bignodes attribute outDX to 2000
2b) for every dcc node whose attribute "value">0 set value=20
2c) eliminate any dcc node whose attribute "value" < 0

point 2b & 2c are the least important


Please Friend Its Very very Urgent for me... Please Reply Anyone

Postnext
James DurningSubject: Convert XML to XML usig XSLT
Author: James Durning
Date: 19 Oct 2006 10:30 AM
1. What happened with the first 2 bignodes?
the only trace left of the 2nd bignode is in ccua with "super cc" and the value attribute.

2. For 2a) do you only change the first output bignodes outDX attribute?

Have you checked out w3c's xsl tutorial?
http://www.w3schools.com/xsl/default.asp

Postnext
Selva Kumar.T.PSubject: Convert XML to XML usig XSLT
Author: Selva Kumar.T.P
Date: 19 Oct 2006 11:21 AM
Yes, I saw W3Schools But I cant Make this Output...

Please if u can then please Solve it...

Its Very Urgent for me...

Posttop
Tony LavinioSubject: Convert XML to XML usig XSLT
Author: Tony Lavinio
Date: 20 Oct 2006 01:27 AM
Since you posted on the Stylus Studio help forum, we might
suggest you use the XSLT mapper to design your solution.
See http://www.stylusstudio.com/xslt_mapper.html

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.