BizTalk Server General - Mapping Multiple Child elements to one child element...

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > October 2005 > Mapping Multiple Child elements to one child element...





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 Multiple Child elements to one child element...
Testdummy

2005-10-25, 5:52 pm

New to Biztalk...so don't shoot me.

I have a schema that has 6 child elements and I need to put the values
of those 6 elements in one child element in by outbound Mgs that allow
multiple occurances(set).

Question:
1.How do I step throught my inboundMessage child elements and map to
multiple child elements in my outboundMessage in Biztalk Mapper?

InbounMessage - Flattened ==> OutboundMessage -Not flattened

Thanks
JpII

Testdummy

2005-10-25, 5:52 pm

EXAMPLE

SCHEMA (IN)
<header>
<PO>12</PO>
<CardNum>3245</CardNum>
<POLine>44</POLine>
<Box>1213</Box>
</header>


SCHEMA (OUT)
<root>
<code>
<Value>
</root>




Data will should look like this:

<root>
<code>401</code> -- Constant Value I will need to add (401)meaning PO
<Value>12</Value>

<code>402</code> -- Constant Value I will need to add (402)meaning
CARDNUM
<Value>3245</Value>

<code>403</code> -- Constant Value I will need to add (403)meaning
POLINE
<Value>44</Value>

<code>404</code> -- Constant Value I will need to add (404)meaning BOX
<Value>1213</Value>
</root>

carlos

2005-10-28, 5:03 pm


you can use a functoid script and write a custom Inline XSLT Call Template
like this:

<xsl:template name="MyXsltConcatTemplate">
<xsl:for-each select="/child::node()/child::*">
<xsl:element name="code">
<xsl:value-of select="local-name(.)" />
</xsl:element>
<xsl:element name="value">
<xsl:value-of select="./text()" />
</xsl:element>
</xsl:for-each>
</xsl:template>


"Testdummy" wrote:

> EXAMPLE
>
> SCHEMA (IN)
> <header>
> <PO>12</PO>
> <CardNum>3245</CardNum>
> <POLine>44</POLine>
> <Box>1213</Box>
> </header>
>
>
> SCHEMA (OUT)
> <root>
> <code>
> <Value>
> </root>
>
>
>
>
> Data will should look like this:
>
> <root>
> <code>401</code> -- Constant Value I will need to add (401)meaning PO
> <Value>12</Value>
>
> <code>402</code> -- Constant Value I will need to add (402)meaning
> CARDNUM
> <Value>3245</Value>
>
> <code>403</code> -- Constant Value I will need to add (403)meaning
> POLINE
> <Value>44</Value>
>
> <code>404</code> -- Constant Value I will need to add (404)meaning BOX
> <Value>1213</Value>
> </root>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com