BizTalk Server General - Record count for inner loop in schema

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2005 > Record count for inner loop in schema





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 Record count for inner loop in schema
Gan

2005-11-21, 5:51 pm

Hi
I have a source schema which looks like this
<MyNode>
<record>
<header>
<member1>
<member2>
</record>
<record>
<header>
<member1>
<member2>
<member2>
</record>
<MyNode>

I want to map only the last "<member>" record to destination schema
conditionally. If i take recordcount it gives total number of records in
whole message (in this case 5)If i use inline XSLT then i can output the
recordcount in the script functoid so that i can compare it.
Please help me out to solve this problem.
--
Thanks and Regards,
Gan
Keith Newton

2005-11-21, 5:51 pm

Hi,

You need to make sure you have all your min occurs and max occurs attributes
set on the schema that describes your xml message. They are very important
to how the record count functoid works... If that doesn't work are you able
to send your xsd file as an attachment or something ?

Cheers, Keith

"Gan" <Gan@discussions.microsoft.com> wrote in message
news:D77F21D7-9192-4502-9B48-BA7B3AB64BDD@microsoft.com...
> Hi
> I have a source schema which looks like this
> <MyNode>
> <record>
> <header>
> <member1>
> <member2>
> </record>
> <record>
> <header>
> <member1>
> <member2>
> <member2>
> </record>
> <MyNode>
>
> I want to map only the last "<member>" record to destination schema
> conditionally. If i take recordcount it gives total number of records in
> whole message (in this case 5)If i use inline XSLT then i can output the
> recordcount in the script functoid so that i can compare it.
> Please help me out to solve this problem.
> --
> Thanks and Regards,
> Gan



Gan

2005-11-21, 5:51 pm

Hi Keith,
Thanks for your reply.
My schema is fine.
Microsoft says that the Recordcount functoid returns the total number of
record for the whole message and not for inner nodes loop.
I need some way to find record count for my inned node which occurs multiple
times.
Please let me know if there is a way for find that.

--
Thanks and Regards,
Gan


"Keith Newton" wrote:

> Hi,
>
> You need to make sure you have all your min occurs and max occurs attributes
> set on the schema that describes your xml message. They are very important
> to how the record count functoid works... If that doesn't work are you able
> to send your xsd file as an attachment or something ?
>
> Cheers, Keith
>
> "Gan" <Gan@discussions.microsoft.com> wrote in message
> news:D77F21D7-9192-4502-9B48-BA7B3AB64BDD@microsoft.com...
>
>
>

Keith Newton

2005-11-21, 5:51 pm

Right you are Gan, I was mixing up something I have done with the sum
functoid in the past with the record count. Just tried building what your
talking about and I can see what your up against.

Since you have worked out how to get the record count using Xslt, could you
use Xslt to select the last member record to copy across ? Can the "record"
node only contain "header", "member1" and "member2" records ?

Cheers, Keith

"Gan" <Gan@discussions.microsoft.com> wrote in message
news:36FA43A7-80FF-4A7B-A6FA-FC26A6955620@microsoft.com...[vbcol=seagreen]
> Hi Keith,
> Thanks for your reply.
> My schema is fine.
> Microsoft says that the Recordcount functoid returns the total number of
> record for the whole message and not for inner nodes loop.
> I need some way to find record count for my inned node which occurs
> multiple
> times.
> Please let me know if there is a way for find that.
>
> --
> Thanks and Regards,
> Gan
>
>
> "Keith Newton" wrote:
>


Gan

2005-11-22, 5:54 pm

Hi Keith,
Actually <member> itself is a node and has other fields and elements.
i need to map all of them to destination schema.
So if i use XSlt them its almost like i have to write whole mapping in Xslt
for all of the mapping which i dont want to do. if i do that all then why is
the mapper for?
I need to compare the record count to the n th record and find whether its
the last record and then bind the other elements and fields accordingly.
Let me know if you find anything on this.

--
Thanks and Regards,
Gan


"Keith Newton" wrote:

> Right you are Gan, I was mixing up something I have done with the sum
> functoid in the past with the record count. Just tried building what your
> talking about and I can see what your up against.
>
> Since you have worked out how to get the record count using Xslt, could you
> use Xslt to select the last member record to copy across ? Can the "record"
> node only contain "header", "member1" and "member2" records ?
>
> Cheers, Keith
>
> "Gan" <Gan@discussions.microsoft.com> wrote in message
> news:36FA43A7-80FF-4A7B-A6FA-FC26A6955620@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com