BizTalk Server Orchestration - Biztalk 2004 - XSLT, can the mapper do this?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > July 2005 > Biztalk 2004 - XSLT, can the mapper do this?





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 Biztalk 2004 - XSLT, can the mapper do this?
R vS

2005-06-29, 2:47 am

Hi,

I want to map from following structure:
(I have two persons, one has two addresses and the other has only one
address. I need to group the people under a single node)

<persons>
<person id="100">
<name>Johnson</name>
<street>street1</street>
</person>
<person id="100">
<name>Johnson</name>
<street>street2</street>
</person>
<person id="101">
<name>Thomas</name>
<street>street3</street>
</person>
</persons>

to the structure below:

<persons>
<person id="100">
<name>Johnson</name>
<address>
<street>street1</street>
</address>
<address>
<street>street2</street>
</address>
</person>
<person id="101">
<name>Thomas</name>
<address>
<street>street3</street>
</address>
</person>
</persons>

Until now I was unable to solve this using "standard" biztalk mapper
functionality so I had to use a custom XSLT to perform the mapping.

Does anybody know a way to solve this using biztalk mapper standard
functionality?

Thanks in advance.

R vS


John Glisson

2005-07-02, 2:47 am

To the best of my knowledge, because of the conditional mapping that you are
doing (combining based on id) you will need to have some sort of language to
make the decision for you and build the output to map to the destination
schema. I think that xslt is the cleanest way to accomplish that.

I have seen multiple nodes combined into one destination node using the
table looping functiod, but it did not have output that needed to be combined
conditionally as you have.

John


"R vS" wrote:

> Hi,
>
> I want to map from following structure:
> (I have two persons, one has two addresses and the other has only one
> address. I need to group the people under a single node)
>
> <persons>
> <person id="100">
> <name>Johnson</name>
> <street>street1</street>
> </person>
> <person id="100">
> <name>Johnson</name>
> <street>street2</street>
> </person>
> <person id="101">
> <name>Thomas</name>
> <street>street3</street>
> </person>
> </persons>
>
> to the structure below:
>
> <persons>
> <person id="100">
> <name>Johnson</name>
> <address>
> <street>street1</street>
> </address>
> <address>
> <street>street2</street>
> </address>
> </person>
> <person id="101">
> <name>Thomas</name>
> <address>
> <street>street3</street>
> </address>
> </person>
> </persons>
>
> Until now I was unable to solve this using "standard" biztalk mapper
> functionality so I had to use a custom XSLT to perform the mapping.
>
> Does anybody know a way to solve this using biztalk mapper standard
> functionality?
>
> Thanks in advance.
>
> R vS
>
>
>

Satish AV

2005-07-06, 7:48 am


BizTalk mapping components do not provide this kind of functionality.

This kind of grouping is possible using XSLT. You need to write a custom
xslt script and call it exclusively in your mapper.

Satish.

"John Glisson" wrote:
[vbcol=seagreen]
> To the best of my knowledge, because of the conditional mapping that you are
> doing (combining based on id) you will need to have some sort of language to
> make the decision for you and build the output to map to the destination
> schema. I think that xslt is the cleanest way to accomplish that.
>
> I have seen multiple nodes combined into one destination node using the
> table looping functiod, but it did not have output that needed to be combined
> conditionally as you have.
>
> John
>
>
> "R vS" wrote:
>
Jeff Lynch

2005-07-06, 7:48 am

I did something similar and wrote about it in a recent post. The sample code
can also be downloaded.

http://codebetter.com/blogs/jeff.ly...3/06/56590.aspx

--
Jeff Lynch
"A BizTalk Enthusiast"
http://codebetter.com/blogs/jeff.lynch


"Satish AV" <Satish AV@discussions.microsoft.com> wrote in message
news:97B3D87E-50DA-4A91-B72F-0B3DB6B7321A@microsoft.com...[vbcol=seagreen]
>
> BizTalk mapping components do not provide this kind of functionality.
>
> This kind of grouping is possible using XSLT. You need to write a custom
> xslt script and call it exclusively in your mapper.
>
> Satish.
>
> "John Glisson" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com