Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data
This is the forum to discuss the Wrox book Beginning XSLT and XPath : Transforming XML Documents and Data by Ian Williams ISBN: 978-0-470-47725-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 11th, 2013, 12:45 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT for multiple sources

I have a requirement where I have 2 sources and one target. 1st source contains employee records and other source contains employee and dependent records. They will be joined based on the SSN no. I need to generate target with employee and multiple dependents. Currently with below approach:

<xsl:for-each select="source1Var/ yourComplexElementForSource1">
<xsl:variable name="id" select="id"/>
<xsl:variable name="x" select="x"/>
<xsl:variable name="y" select="$source2Var/yourComplexElementForSource2[id= $id)]/y"/>
<targetVarElement>
<xsl:value-of select="$x * $y"/>
</targetVarElement>
</xsl:for-each>

, the target file has one Employee and 1 dependent. It is not generating for other dependents
Ex: Source 1 record:
ESSN, DOB, DTHIRE etc
Source 2 record:
ESSN, DOB, MEDSTATUS, ACTDTAT etc
DSSN, DOB, ESSN, NEWSTAT, BUILDSTAT etc
DSSN1, DOB1, ESSN, NEWSTAT1, BUILDSTAT1 etc

the target should contain:
Layout1: ESSN, DOB, MEDSTATUS, ACTDTAT etc
Layout2: DSSN, DOB, ESSN, NEWSTAT, BUILDSTAT etc
DSSN1, DOB1, ESSN, NEWSTAT1, BUILDSTAT1 etc

the target currently is with only DSSN and does not have DSSN1:
Layout1: ESSN, DOB, MEDSTATUS, ACTDTAT etc
Layout2: DSSN, DOB, ESSN, NEWSTAT, BUILDSTAT etc
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Datasets from multiple Data Sources SQL_Hacker Reporting Services 1 June 18th, 2008 03:25 PM
Deal with multiple sources Hind XSLT 2 June 5th, 2006 08:16 AM
Populating DropDownList from multiple sources hawkfb63 ASP.NET 2.0 Professional 2 February 14th, 2006 06:42 PM
Query from multiple data sources billmedd BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 September 27th, 2004 11:46 AM



All times are GMT -4. The time now is 04:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.