BizTalk Server General - Mapping repeating sml structure to flat csv file

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > May 2005 > Mapping repeating sml structure to flat csv file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mapping repeating sml structure to flat csv file
vaas

2005-05-30, 2:47 am

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
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

first record of Denom2 record is getting repeated.

Please help me insolving this issue..

Thanks
vaas

Please help me insolving this issue..

Thanks
vaas
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com