BizTalk Server General - Record Count in Mapper

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > Record Count in Mapper





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 in Mapper
Chris

2004-11-10, 5:48 pm

I am having a problem determining the number of records in a repeating
structure. The structure looks like the following.

<root>
<record>
<header></header>
<detail></detail>
<detail></detail>
<detail></detail>
<detail></detail>
</record>
<record>
<header></header>
<detail></detail>
<detail></detail>
<detail></detail>
<detail></detail>
<detail></detail>
</record>
</root>

In the mapper, I attach the <detail> inbound record to a record count
functoid, and it returns the value 9. What I want is to find out the number
of <detail> elements there are in each corresponding <record> node. I would
like for my record count to retun 4 for the first iteration of the <record>
node, and 5 for the second iteration of the <record> node.

Any ideas?

Chris


Tatyana Yakushev [MSFT]

2004-11-11, 8:46 pm

You can do it with XSLT Template (scripting functoid)

XSLT should be similar to
<xsl:template name="DetailCount">
<xsl:element name=" Name_Of_The_Field_Where_You_Want_To_Put_
The_Value">
<xsl:value-of select="count(./detail)" />
</xsl:element>
</xsl:template>

Regards,
Tatyana
--------------------
>From: "Chris" <cahale@shellopus.com>
>Subject: Record Count in Mapper
>Date: Wed, 10 Nov 2004 14:55:24 -0600
>Lines: 32
>Organization: Shell
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <enPzbe2xEHA.3024@TK2MSFTNGP14.phx.gbl>
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: 66.6.80.21
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:21521
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>I am having a problem determining the number of records in a repeating
>structure. The structure looks like the following.
>
><root>
> <record>
> <header></header>
> <detail></detail>
> <detail></detail>
> <detail></detail>
> <detail></detail>
> </record>
> <record>
> <header></header>
> <detail></detail>
> <detail></detail>
> <detail></detail>
> <detail></detail>
> <detail></detail>
> </record>
></root>
>
>In the mapper, I attach the <detail> inbound record to a record count
>functoid, and it returns the value 9. What I want is to find out the number
>of <detail> elements there are in each corresponding <record> node. I would
>like for my record count to retun 4 for the first iteration of the <record>
>node, and 5 for the second iteration of the <record> node.
>
>Any ideas?
>
>Chris
>
>
>



--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com