Re: Mapping more than 100 messages to one message

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




HI Greg Forsythe,

Thanks for immediate reply and soln.,

i have implemented to this code with your direction. It gives the error
message as "Output validation error: The root element is missing."

And the following message was show in the output xml file in _mapdata folder

*----------------------------------------------------------------------*

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.
----------------------------------------------------------------------
XML document must have a top level element. Error processing resource
'file:///C:/Documents and Settings/biztalk/Local Sett...
--------------------------------------------------------------------------------

If you have any solution, please send.

Thanks

Murugan A



"Greg Forsythe" wrote:

Create a file in the project directory e.g. "CustomMap.xslt" and paste the
xslt code.
Add your file to your project (not really necessary but helps with source
control)
Create a map, select source schema, and destination schema.
Click on centre grid of map.
Go to Properties Window and select Custom Xslt ellipsis and select your file

You can then use Test Map.

Greg


"Murugan" <Murugan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9510777D-B39E-4DCD-ACAF-D9B39F3A4F07@xxxxxxxxxxxxxxxx
Hi Greg Forsythe,

In Biztalk , how to implement this, ie.) how to add this schema in the
project.

Thanks
Murugan A

"Greg Forsythe" wrote:

Here is a custom Xslt that will group student records by college:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var";
exclude-result-prefixes="msxsl var" version="1.0">
<xsl:output omit-xml-declaration="yes" version="1.0" method="xml" />
<xsl:key name="collegekey" match="/root/Student" use="@CollegeId"/>
<xsl:template match="/">
<xsl:apply-templates select="/root" />
</xsl:template>
<xsl:template match="/root">
<root>
<xsl:for-each select="Student">
<xsl:variable name="group" select="key('collegekey', @CollegeId)"/>
<xsl:if test="generate-id($group[1]) = generate-id()">
<College>
<xsl:variable name="var:Id" select="@CollegeId"/>
<xsl:attribute name="Id">
<xsl:value-of select="$var:Id"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="/root/College[@Id = $var:Id]/@Name"/>
</xsl:attribute>
<xsl:for-each select="$group">
<Student>
<xsl:attribute name="Id">
<xsl:value-of select="@Id" />
</xsl:attribute>
<xsl:attribute name="Name">
<xsl:value-of select="@Name" />
</xsl:attribute>
<xsl:attribute name="Mark">
<xsl:value-of select="@Mark" />
</xsl:attribute>
<xsl:attribute name="CollegeId">
<xsl:value-of select="@CollegeId" />
</xsl:attribute>
</Student>
</xsl:for-each>
</College>
</xsl:if>
</xsl:for-each>
</root>
</xsl:template>
</xsl:stylesheet>

Input Xml:
<root>
<College Id="1" Name="1st College"/>
<College Id="2" Name="2nd College"/>
<Student Id="101" Name ="Anand" Mark="90" CollegeId="1"/>
<Student Id="102" Name ="Britto" Mark="70" CollegeId="1"/>
<Student Id="103" Name ="John" Mark="72" CollegeId="1"/>
<Student Id="201" Name ="Arun" Mark="90" CollegeId="2"/>
<Student Id="202" Name ="Bosh" Mark="70" CollegeId="2"/>
<Student Id="203" Name ="David" Mark="72" CollegeId="2"/>
</root>

Output Xml
<root>
<College Id="1" name="1st College">
<Student Id="101" Name="Anand" Mark="90" CollegeId="1" />
<Student Id="102" Name="Britto" Mark="70" CollegeId="1" />
<Student Id="103" Name="John" Mark="72" CollegeId="1" />
</College>
<College Id="2" name="2nd College">
<Student Id="201" Name="Arun" Mark="90" CollegeId="2" />
<Student Id="202" Name="Bosh" Mark="70" CollegeId="2" />
<Student Id="203" Name="David" Mark="72" CollegeId="2" />
</College>
</root>

Greg


"Murugan" <Murugan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:644B0753-8E2D-4614-A7A2-66C53CB79EF8@xxxxxxxxxxxxxxxx
Hi Rajesh,

In Source side of the BTS Map has provide the only 100 messages thro
transform shape in Orchestration. I solve that problem using more than
one
map it has divdide to multiple.

It was another problem, I have a two messages, one is like

Inbound1:
-----------
<College Id="1" Name="1st College"/>
<College Id="2" Name="2nd College"/>

and another one is

Inbound2:
-----------
<Student Id="101" Name ="Anand" Mark="90" CollegeId="1"/>
<Student Id="102" Name ="Britto" Mark="70" CollegeId="1"/>
<Student Id="103" Name ="John" Mark="72" CollegeId="1"/>

<Student Id="201" Name ="Arun" Mark="90" CollegeId="2"/>
<Student Id="202" Name ="Bosh" Mark="70" CollegeId="2"/>
<Student Id="203" Name ="David" Mark="72" CollegeId="2"/>


I need Combined message like below

Outbound:
------------

<College Id="1" Name="1st College">
<Student Id="101" Name ="Anand" Mark="90" CollegeId="1"/>
<Student Id="102" Name ="Britto" Mark="70" CollegeId="1"/>
<Student Id="103" Name ="John" Mark="72" CollegeId="1"/>
</College>
<College Id="2" Name="2nd College">
<Student Id="201" Name ="Arun" Mark="90" CollegeId="2"/>
<Student Id="202" Name ="Bosh" Mark="70" CollegeId="2"/>
<Student Id="203" Name ="David" Mark="72" CollegeId="2"/>
</College>

after mapping two messages.

How to map these two message to one message, if you have an idea share
with
me.

I hope the above scenario, its clear to understand you.

Thanks
Murugan A









"Rajesh" wrote:

Muru,
Are you trying to take input from 100 elements and map to one? I
didn't
understand your problem. There is no limitation on BTS map.

RajP

"Murugan" wrote:

Hi Leonid Ganeline,

It is another problem to map the two related schemas to one schema.

Let us consider,
xml data1 :

<College Id="1" Name="1st College"/>

xml data2:(Multiple data under one college)

<Student Id="101" Name ="Anand" Mark="90" CollegeId="1"/>
<Student Id="102" Name ="Britto" Mark="70" CollegeId="1"/>
<Student Id="103" Name ="John" Mark="72" CollegeId="1"/>


I have mapped to above two xml data to one . ie, its displayed as

<College Id="1" Name="1st College">
<Student Id="101" Name ="Anand" Mark="90" CollegeId="1"/>
<Student Id="102" Name ="Britto" Mark="70" CollegeId="1"/>
<Student Id="103" Name ="John" Mark="72" CollegeId="1"/>
</College>

But i cannt able to do this, If you have any idea please explain
this

Thanks

Murugan A



"Murugan" wrote:

Thanks for immediate reply,

I will try with your suggestion.


"Leonid Ganeline" wrote:

Separate the whole process to 2 or more stages. 100(by 50) -->
to
2 --> to 1
I'm sure there should be the semantic grouping of these schemas.

--
Regards,

Leonid Ganeline
BizTalk Solution Developer
===================================
BizTalk Blog -- http://geekswithblogs.net/leonidganeline

"Murugan" <Murugan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:901B142A-2FD6-4CA3-8A21-E63866061196@xxxxxxxxxxxxxxxx
Hi all,

i have problem in Mapping. In the Source of the Map, i cann't
able add
the
more than 100 message. Is it limitation of the BTS map? If
able
to map the
more than 100 message to one message, please share the idea

Thanks

Murugan A









.



Relevant Pages

  • Re: Mapping more than 100 messages to one message
    ... Input Xml: ... In Source side of the BTS Map has provide the only 100 messages thro ... "Murugan" wrote: ...
    (microsoft.public.biztalk.general)
  • Re: Mapping more than 100 messages to one message
    ... Murugan A ... Input Xml: ... In Source side of the BTS Map has provide the only 100 messages thro ... It is another problem to map the two related schemas to one schema. ...
    (microsoft.public.biztalk.general)
  • Re: Mapping more than 100 messages to one message
    ... Murugan A ... Input Xml: ... In Source side of the BTS Map has provide the only 100 messages thro ...
    (microsoft.public.biztalk.general)
  • Re: Create Multiple Nodes
    ... Which functoid I should use to generate multiple target nodes. ... This isn't well-formed XML. ... schema that has the rootnode and an any-element below it. ... need a map that specifies the books-xml and use a map to map book to ...
    (microsoft.public.biztalk.general)
  • Re: Mapping more than 100 messages to one message
    ... Create a map, select source schema, and destination schema. ... Murugan A ... Input Xml: ...
    (microsoft.public.biztalk.general)