BizTalk Server Tools - Biztalk mapper

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > March 2004 > Biztalk 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 Biztalk mapper
brian

2004-02-08, 8:43 am

Hi

I want to create a map in biztalk mapper to translate this
sample xml

<a>b;c;d</a>

into

<x>b</x>
<x>c</x>
<x>d</x>

how can this be done?

thanks
brian
Jan Eliasen

2004-02-08, 8:43 am

On Wed, 28 Jan 2004 08:45:22 -0800, "brian"
<anonymous@discussions.microsoft.com> wrote:

Plenty use of functoids - the String-ones, I mean :-)

Something about looking up the position of ";" and the substring to
get the part of the string, etc. It will probably get messy - but it
can be done.

>Hi
>
>I want to create a map in biztalk mapper to translate this
>sample xml
>
><a>b;c;d</a>
>
>into
>
><x>b</x>
><x>c</x>
><x>d</x>
>
>how can this be done?
>
>thanks
>brian


--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
brian

2004-02-08, 8:43 am

thanks

right, but how can I split it into multiple elements. All
this started from a csv file as follows:

g,h,i,b;c;d,j

maybe it can be done more cleanly from the editor? it
seems that for a csv you cannot have record within another
record

10x
brian


>-----Original Message-----
>On Wed, 28 Jan 2004 08:45:22 -0800, "brian"
><anonymous@discussions.microsoft.com> wrote:
>
>Plenty use of functoids - the String-ones, I mean :-)
>
>Something about looking up the position of ";" and the

substring to
>get the part of the string, etc. It will probably get

messy - but it
>can be done.
>
this[color=blue]
>
>--
>Jan Eliasen, representing himself and not the company he

works for.
> MCP in Microsoft BizTalk Server
>.
>

Jan Eliasen

2004-02-08, 8:43 am

On Thu, 29 Jan 2004 04:42:50 -0800, "brian"
<anonymous@discussions.microsoft.com> wrote:

I am a bit confused right now. You say that it is a csv? But in your
example in the first posting you had an XML-example. So which one is
it?
[color=blue]
>thanks
>
>right, but how can I split it into multiple elements. All
>this started from a csv file as follows:
>
>g,h,i,b;c;d,j
>
>maybe it can be done more cleanly from the editor? it
>seems that for a csv you cannot have record within another
>record
>
>10x
>brian
>
>
>substring to
>messy - but it
>this
>works for.

--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
brian

2004-02-08, 8:43 am

Hi Jan

Originally it was as CSV. I used Biztalk editor to get
the XML. But I still can't manage to find the way to do
it with the mapper. I wrote an XSLT to do it, but I can't
find a way to make BizTalk using it.

10x
brian



>-----Original Message-----
>On Thu, 29 Jan 2004 04:42:50 -0800, "brian"
><anonymous@discussions.microsoft.com> wrote:
>
>I am a bit confused right now. You say that it is a csv?

But in your
>example in the first posting you had an XML-example. So

which one is
>it?
>
All[color=blue]
another[color=blue]
he[color=blue]
>
>--
>Jan Eliasen, representing himself and not the company he

works for.
> MCP in Microsoft BizTalk Server
>.
>

Jan Eliasen

2004-02-08, 8:43 am

On Tue, 3 Feb 2004 01:22:54 -0800, "brian"
<anonymous@discussions.microsoft.com> wrote:

If you have a CSV, then I don't understand how you got to <a>b;c;d</a>
?

The csv probably looks like
a,b,c,d
You can write a documentspecification for that. Then in your map, you
can do with the fields what you want. Is the problem that you can not
create a proper specification for the csv?
[color=blue]
>Hi Jan
>
>Originally it was as CSV. I used Biztalk editor to get
>the XML. But I still can't manage to find the way to do
>it with the mapper. I wrote an XSLT to do it, but I can't
>find a way to make BizTalk using it.
>
>10x
>brian
>
>
>
>But in your
>which one is
>All
>another
>he
>works for.

--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
brian

2004-02-08, 8:43 am

Hi Jan

the CSV is as follows:

--> g,h,i,b;c;d,j

and I converted it to

--> <a>b;c;d</a>

but in the output specification I need to change that to

--> <x>b</x>
--> <x>c</x>
--> <x>d</x>

Hope this eplains it.

Thanks again
brian





>-----Original Message-----
>On Tue, 3 Feb 2004 01:22:54 -0800, "brian"
><anonymous@discussions.microsoft.com> wrote:
>
>If you have a CSV, then I don't understand how you got to

<a>b;c;d</a>
>?
>
>The csv probably looks like
>a,b,c,d
>You can write a documentspecification for that. Then in

your map, you
>can do with the fields what you want. Is the problem that

you can not
>create a proper specification for the csv?
>
can't[color=blue]
csv?[color=blue]
the[color=blue]
translate[color=blue]
he[color=blue]
>
>--
>Jan Eliasen, representing himself and not the company he

works for.
> MCP in Microsoft BizTalk Server
>.
>

Jan Eliasen

2004-02-08, 8:43 am

On Wed, 4 Feb 2004 05:54:16 -0800, "brian"
<anonymous@discussions.microsoft.com> wrote:

Right. Well, do you know how many elements are in the <a>-tag? Is it
always three? In that case, use the string-find-functoid to find the
positions of the semicolons, and the string-extract-functoid to
extract the strings.
[color=blue]
>Hi Jan
>
>the CSV is as follows:
>
>--> g,h,i,b;c;d,j
>
>and I converted it to
>
>--> <a>b;c;d</a>
>
>but in the output specification I need to change that to
>
>--> <x>b</x>
>--> <x>c</x>
>--> <x>d</x>
>
>Hope this eplains it.
>
>Thanks again
>brian
>
>
>
>
>
><a>b;c;d</a>
>your map, you
>you can not
>can't
>csv?
>the
>translate
>he
>works for.

--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
brian

2004-02-08, 8:43 am

No I have no idea about that. It can be 0 or any number.
The thing is that this is trivial in xslts. Can I use
this XSLT somehow? Is there a functoid or anything else
which can accept a part of an XSLT? I am attaching it:

<xsl:template name="splitter">
<xsl:param name="strInput" select="''" />
<xsl:choose>
<xsl:when test="string-length($strInput) > 0">
<xsl:if test="contains($strInput,',')">
<a> <xsl:value-of select="substring-before
($strInput,',')"/> </a>
</xsl:if>
<xsl:if test="not(contains($strInput,','))">
<a> <xsl:value-of select="$strInput"/> </a>
</xsl:if>
<xsl:call-template name="splitter">
<xsl:with-param name="strInput" select="substring-
after($strInput,',')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise />
</xsl:choose>
</xsl:template>


Thanks
Brian


>-----Original Message-----
>On Wed, 4 Feb 2004 05:54:16 -0800, "brian"
><anonymous@discussions.microsoft.com> wrote:
>
>Right. Well, do you know how many elements are in the <a>-

tag? Is it
>always three? In that case, use the string-find-functoid

to find the
>positions of the semicolons, and the string-extract-

functoid to
>extract the strings.
>
to[color=blue]
that[color=blue]
get[color=blue]
do[color=blue]
So[color=blue]
elements.[color=blue]
it[color=blue]
)[color=blue]
get[color=blue]
company[color=blue]
he[color=blue]
>
>--
>Jan Eliasen, representing himself and not the company he

works for.
> MCP in Microsoft BizTalk Server
>.
>

Tan Bao Nguyen

2004-02-10, 10:37 am

Brian,

You can use a Scripting functoid, set the Script type to "Inline XSLT" and
copy your XSLT code in the Inline script buffer (see the Scripting functoid
for more info). Then link the Scripting functoid to your destination node.
The XSLT in the functoid code will produce the output XML.

Regards,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[color=blue]
<truh105mltrknh8migvbstaps24d652gkc@4ax.com>
<66d901c3e665$680158f0$a001280a@phx.gbl>
<1i5s1056ak7sn9qpvv0ibs6ncglsngj6ff@4ax.com>
<937901c3ea37$4d924bc0$a401280a@phx.gbl>
<bu1v109obev090e883f813aklijnj9hrbv@4ax.com>
<a1f301c3eb26$6110c740$a601280a@phx.gbl>
<t90220l7q9h2478vfqu8ri0br166ft9aih@4ax.com>[color=blue]

Jan Eliasen

2004-02-10, 6:35 pm

On Tue, 10 Feb 2004 23:40:41 GMT, tanbn@online.microsoft.com (Tan Bao
Nguyen) wrote:

Is that a feature in BizTalk 2002? In that case, I can't find it.
[color=blue]
>Brian,
>
>You can use a Scripting functoid, set the Script type to "Inline XSLT" and
>copy your XSLT code in the Inline script buffer (see the Scripting functoid
>for more info). Then link the Scripting functoid to your destination node.
> The XSLT in the functoid code will produce the output XML.
>
>Regards,
>Tan Nguyen
>Microsoft BizTalk Server
>
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>--------------------
><truh105mltrknh8migvbstaps24d652gkc@4ax.com>
><66d901c3e665$680158f0$a001280a@phx.gbl>
><1i5s1056ak7sn9qpvv0ibs6ncglsngj6ff@4ax.com>
><937901c3ea37$4d924bc0$a401280a@phx.gbl>
><bu1v109obev090e883f813aklijnj9hrbv@4ax.com>
><a1f301c3eb26$6110c740$a601280a@phx.gbl>
><t90220l7q9h2478vfqu8ri0br166ft9aih@4ax.com>

--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
Tan Bao Nguyen

2004-03-01, 9:34 pm

It's a feature in BizTalk 2004.

Regards,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[color=darkred]
<truh105mltrknh8migvbstaps24d652gkc@4ax.com>
<66d901c3e665$680158f0$a001280a@phx.gbl>
<1i5s1056ak7sn9qpvv0ibs6ncglsngj6ff@4ax.com>
<937901c3ea37$4d924bc0$a401280a@phx.gbl>
<bu1v109obev090e883f813aklijnj9hrbv@4ax.com>
<a1f301c3eb26$6110c740$a601280a@phx.gbl>
<t90220l7q9h2478vfqu8ri0br166ft9aih@4ax.com>
<9eb201c3ebbe$c01a2b80$a101280a@phx.gbl>
<eGJbR9C8DHA.1992@cpmsftngxa07.phx.gbl>[color=darkred]
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP09.phx.gbl[color=darkred]
and[color=darkred]
functoid[color=darkred]
node.[color=darkred]
rights.[color=darkred]

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com