Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Biztalk
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2005, 11:53 PM
Registered User
 
Join Date: May 2005
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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Flat structure to Nested dani1 XSLT 2 October 29th, 2008 02: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 08:58 AM
create CSV flat file from mysql table pb MySQL 1 September 21st, 2005 10:51 AM
XML to (different <tag>) XML mapping Thodoris XML 4 April 27th, 2004 04:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.