Biztalk mapper
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 > Biztalk mapper




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Biztalk mapper  
brian


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


 
02-08-04 01:43 PM

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





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
Jan Eliasen


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


 
02-08-04 01:43 PM

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





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
brian


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


 
02-08-04 01:43 PM

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 
>
>--
>Jan Eliasen, representing himself and not the company he
works for.
>  MCP in Microsoft BizTalk Server
>.
>





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
Jan Eliasen


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


 
02-08-04 01:43 PM

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?

>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





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
brian


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


 
02-08-04 01:43 PM

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 
another 
he 
>
>--
>Jan Eliasen, representing himself and not the company he
works for.
>  MCP in Microsoft BizTalk Server
>.
>





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
Jan Eliasen


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


 
02-08-04 01:43 PM

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?

>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





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
brian


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


 
02-08-04 01:43 PM

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 
csv? 
the 
translate 
he 
>
>--
>Jan Eliasen, representing himself and not the company he
works for.
>  MCP in Microsoft BizTalk Server
>.
>





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
Jan Eliasen


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


 
02-08-04 01:43 PM

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.

>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





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
brian


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


 
02-08-04 01:43 PM

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 
that 
get 
do 
So 
elements. 
it 
) 
get 
company 
he 
>
>--
>Jan Eliasen, representing himself and not the company he
works for.
>  MCP in Microsoft BizTalk Server
>.
>





[ Post a follow-up to this message ]



    Re: Biztalk mapper  
Tan Bao Nguyen


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


 
02-10-04 03:37 PM

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> 






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:51 PM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   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