Follow up - Merging two messages
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Tools > Follow up - Merging two messages




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Follow up - Merging two messages  
Yossi Dahan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-23-05 10:48 PM

Ok, after quite a lot of struggling I've managed to accomplish this using a
map. I'm still hoping to get some insight from you guys out there, to see if
there are any better approached.

Basically I've linked the first part to the result as you would do, and then
used an inline xslt script to lookup the price from the second part.

I'll need to check how this performs with large documents, but at least its
working.

Two quick quesions on the xml side of things -
Is there a way to use xpath in the xslt script using namespaces? (I've kept
using the local-name() and  namespace-uri()  xslt functions)
and while on this - is there a difference in performance between the two? my
guess is that this result in exactly the same behaviour...

Thanks

Yossi Dahan


"Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
news:O5nMOE5jFHA.3568@tk2msftngp13.phx.gbl...
> Hi all,
>
> I'd appreciate your any thoughts on the following:
>
> I'm getting  into biztalk two documents describing a catalog of items.
> one document contains for each item code and description and the other
> document contains code and price (this is very simplified description of
> course)
>
> I need a single file containing all three fields (for the correct item of
> course)
>
> to illustrate, document 1 looks like:
>
> <ns0:Source xmlns:ns0="http://MergeXmls.Items">
>  <SupplierCode>SupplierCode_0</SupplierCode>
>  <Items>
>    <Item>
>      <Code>Code_0</Code>
>      <Description>Description_0</Description>
>    </Item>
>    <Item>
>      <Code>Code_1</Code>
>      <Description>Description_1</Description>
>    </Item>
>  </Items>
> </ns0:Source>
>
> second document looks like:
>
> <ns0:Prices xmlns:ns0="http://MergeXmls.Prices">
>  <Items>
>    <Item>
>      <Code>Code_0</Code>
>      <Price>Price_0</Price>
>    </Item>
>    <Item>
>      <Code>Code_1</Code>
>      <Price>Price_1</Price>
>    </Item>
>  </Items>
>  <SupplierCode>SupplierCode_0</SupplierCode>
> </ns0:Prices>
>
> and the expected result should look like:
>
> <ns0:Catalog xmlns:ns0="http://MergeXmls.Catalog">
>  <Item>
>    <Code>Code_0</Code>
>    <Description>Description_0</Description>
>    <Price>Price_0</Price>
>  </Item>
>  <Item>
>    <Code>Code_1</Code>
>    <Description>Description_1</Description>
>    <Price>Price_1</Price>
>  </Item>
>  <SupplierCode>SupplierCode_0</SupplierCode>
> </ns0:Catalog>
>
> Now I have an orchestration with correlation accepting both input messages
> I've considered three options to do this:
> 1. Using the mapper in the orchestration with two inputs (both messages)
> 2. Using a custom component in the orchestration to receive both message
> and return the third
> 3. Using database - store all data from both messages and extracting the
> result.
>
> I've could not find a way to create a map that will do the job. any tips
> on how this can be done will be greatly appreciated.
>
> Custom component was very easy to write, but is very slow (and since we're
> dealing with few mb in each file this become a problem)
>
> Database should be easy to do, but again - writing a few mb to the db
> twice just to read them joined sounds like an over kill.
>
> Any ideas?
>
> Thanks
>
> Yossi Dahan
>







[ Post a follow-up to this message ]



    Re: Follow up - Merging two messages  
Marc Jennings


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-19-05 10:52 PM

Hi Yossi,

I am trying to acomplish a very similar thing to your original
problem, but I can't get the inline xslt to work properly.  Could you
post some of your transform here for me to look at, please?

Thanks
Marc.

On Sat, 23 Jul 2005 18:12:32 +0100, "Yossi Dahan"
<yossi.dahan@sabratech.co.uk> wrote:

>Ok, after quite a lot of struggling I've managed to accomplish this using a
>map. I'm still hoping to get some insight from you guys out there, to see i
f
>there are any better approached.
>
>Basically I've linked the first part to the result as you would do, and the
n
>used an inline xslt script to lookup the price from the second part.
>
>I'll need to check how this performs with large documents, but at least its
>working.
>
>Two quick quesions on the xml side of things -
>Is there a way to use xpath in the xslt script using namespaces? (I've kept
>using the local-name() and  namespace-uri()  xslt functions)
>and while on this - is there a difference in performance between the two? m
y
>guess is that this result in exactly the same behaviour...
>
>Thanks
>
>Yossi Dahan
>
>
>"Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
>news:O5nMOE5jFHA.3568@tk2msftngp13.phx.gbl... 
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:57 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register