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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + ConvertFromXML to TXT (2)
-> + Edi X12 835 to Flat file (2)
-> + License problem (2)
-> + Removal of elements from an XM... (3)
-> + XSL and Word docs (2)
-> + Develop a workflow using xml (2)
-> + Need help converting CSV to Ne... (2)
-> + Specify valid values for an el... (3)
-> + Question about the WYSIWYG fun... (2)
-> + XML diff tool (4)
-> + Validating schemas (3)
-> + Best way to fix a few hundred ... (6)
-> - Mapping problem please help me (2)
-> ->Mapping problem please he...
-> + Relational Database Hierarchic... (2)
-> + RDBMS - XML round-tripping (3)
-> + Converto FILE to XML (2)
-> - relational database acces - lo... (1)
-> + unsupportet URL scheme when tr... (6)
-> + XML in oil industry (3)
-> - Want to get the available para... (1)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio Announcements (113)
Topic  
Postnext
satish kumarSubject: Mapping problem please help me
Author: satish kumar
Date: 08 Jun 2007 04:26 AM
I am having two XML structures those are
Source Struck:
<?xml version="1.0" encoding="UTF-8"?>

<ns0:EmpFileinfo xmlns:ns0="http://ehro.eds.com/LAB_TEST/EmpCommunication">
<Row>
<Dno>10t</Dno>
<Designation>Manager</Designation>
<Department>Accounts</Department>
</Row>
</ns0:EmpFileinfo>

Receiver Struc:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:AccessOB xmlns:ns0="http://dheeraj/test/VM_ID">
<Row>
<Deptno>10</Deptno>
<Department>Accounts</Department>
<Eno>1001</Eno>
<Ename>Praveen</Ename>
<Designation>CA</Designation>
</Row>
</ns0:AccessOB>


Here i want to mapp from source to Target structures. The target structure should get the values from the source structure when the source structure "dno" value is 10 otherwise it should not get the values into target structure.

Then what is the procedure.

Thanks,
Satish.

Posttop
(Deleted User) Subject: Mapping problem please help me
Author: (Deleted User)
Date: 11 Jun 2007 06:30 AM
Hi Satish,
you can use XSLT Mapper to jump start your transformation:
- load the first XML in the left pane
- load the second XML in the right pane
- right click on the canvas, pick 'Condition Tests', then '='
- drag the Dno element from the left pane to the top input port of the '=' symbol
- double click on the bottom input port of the '=' symbol, and enter 10 in the dialog box
- right click on the canvas, pick 'XSLT Instructions', then 'if'
drag the output port of the '=' symbol to the input port of the 'if'
- drag the output port of the 'if' symbol to the Row element in the right tree
- drag the Dno to the Deptno
- drag the Department to the Department
(at this point I have no idea from where the data for employee data comes from)

Hope this helps,
Alberto

   
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.