Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Biztalk
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Biztalk General discussion about Biztalk server.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Biztalk 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 30th, 2005, 12:53 AM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default mapping repeating xml structure to flat csv f

Hi,

  I need to map a repeating xml structure to flat csv file.

  Here are the xsd's.

Input schema:
-------------

<Root>
  <Denom1>
    <Record>
      <ID1>
      <Denom1>
      <Denom2>
    </Record>
    <Record></Record>
     ..
     ..
  <Denom2>
    <Record>
      <ID2>
      <Denom3>
      <Denom4>
    </Record>
    <Record></Record>
     ..
     ..
  </Denom2>
<Root>

Output Flat file schema:
-------------------------

<Root>
<Header>
  <ID1>
  <Denom1>
  <Denom2>
  <ID2>
  <Denom3>
  <Denom4>
</Header>
<Body>
  <ID1>
  <Denom1>
  <Denom2>
  <ID2>
  <Denom3>
  <Denom4>
</Body>
</Root>


I wrote inline XSLT in script functoid..

<xsl:template name="OrderXSLTSplit">
 <xsl:param name="param1"/>
 <xsl:param name="param2"/>
 <xsl:param name="param3"/>
 <xsl:param name="param4"/>
 <xsl:param name="param5"/>
 <xsl:param name="param6"/>
 <Body>
  <ID1><xsl:value-of select="$param1"><ID1>
  <ID2><xsl:value-of select="$param2"><ID2>
  <Denom1><xsl:value-of select="$param3"><Denom1>
  <Denom2><xsl:value-of select="$param4"><Denom2>
  <Denom3><xsl:value-of select="$param5"><Denom1>
  <Denom4><xsl:value-of select="$param6"><Denom1>
 </Body>
</xsl:template>

This is the output that is generated by the map...

ID1,Denom1,Denom2,ID2,Denom3,Denom4
VS100,100,200,VS200,500s,100
VS101,200,400,VS200,500s,100
VS102,300,600,VS200,500s,100

if you observe, first record of Denom2 record is getting repeated.

Please help me in solving this issue..

Thanks
vaas
Reply With Quote
Reply


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
Convert Flat structure to Nested dani1 XSLT 2 October 29th, 2008 03:51 AM
Flat DB structure into XML Hierarchy DaveQuested XSLT 1 January 29th, 2007 10:25 AM
Flat XML structure to a tree by XSLT Borg0011 XSLT 2 July 9th, 2006 09:58 AM
create CSV flat file from mysql table pb MySQL 1 September 21st, 2005 11:51 AM
XML to (different <tag>) XML mapping Thodoris XML 4 April 27th, 2004 05:02 AM



All times are GMT -4. The time now is 08:47 AM.


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