BizTalk Server General - Map element attributes to elements

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > March 2006 > Map element attributes to elements





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 Map element attributes to elements
Slash Gordon

2006-03-21, 3:09 am

Hi,

I'm trying the following:

My input file has the following format:
=====
<field type="author">N. Wirth</field>
<field type="title">Compilerbau</field>
<field type="published">1977</field>
=====
and I want the mapping to produce the following:
====
<author>N. Wirth</author>
<title>Compilerbau</title>
<published>1977</published>
====

Is there a way to accomplish this using functoids?

Any answer would be helpful.

Cheers

Slash Gordon


Eric Stott

2006-03-21, 3:09 am

Yes you could by creating your own custom XSLT.

Why would you not want to use functoids?
Eric
http://stottcreations.com/blog

"Slash Gordon" <SlashGordon@discussions.microsoft.com> wrote in message
news:5D817BB7-0625-48E4-AE8E-0A203052DF8E@microsoft.com...
> Hi,
>
> I'm trying the following:
>
> My input file has the following format:
> =====
> <field type="author">N. Wirth</field>
> <field type="title">Compilerbau</field>
> <field type="published">1977</field>
> =====
> and I want the mapping to produce the following:
> ====
> <author>N. Wirth</author>
> <title>Compilerbau</title>
> <published>1977</published>
> ====
>
> Is there a way to accomplish this using functoids?
>
> Any answer would be helpful.
>
> Cheers
>
> Slash Gordon
>
>



Slash Gordon

2006-03-21, 3:09 am


Hi Eric,

thanx for your quick answer first,
this may be a misunderstanding; I never have done XSLT programming
before and therefore I'd like to use functoids, if possible. I thought a
combination
of scripting and table functoids might enable me to get the result without
the need to learn xslt.

Is it possible?

Thank you again

Slash Gordon

"Eric Stott" wrote:

> Yes you could by creating your own custom XSLT.
>
> Why would you not want to use functoids?
> Eric
> http://stottcreations.com/blog
>

Eric Stott

2006-03-21, 3:10 am

Well, it would help if I would read correctly your question, yes you want to
use functoids.

In your case you want to use the attribute to an equal functoid, then the
second argument to the = being author, that would be connected to a value
mapping(flattening) functoid and the second argument would be the actual
value you want. The output of the value mapping would be to your
destintation.

This would repeat for all of your values.

Hope that this helps,
Eric
http://stottcreations.com/blog

"Slash Gordon" <SlashGordon@discussions.microsoft.com> wrote in message
news:C68FF14E-C7BC-4B00-A752-86A1DEA5E7CF@microsoft.com...[vbcol=seagreen]
>
> Hi Eric,
>
> thanx for your quick answer first,
> this may be a misunderstanding; I never have done XSLT programming
> before and therefore I'd like to use functoids, if possible. I thought a
> combination
> of scripting and table functoids might enable me to get the result without
> the need to learn xslt.
>
> Is it possible?
>
> Thank you again
>
> Slash Gordon
>
> "Eric Stott" wrote:
>


Slash Gordon

2006-03-21, 5:54 pm


Hi Eric,

thanx again, this helped a lot. I managed to produce the output I was
looking for.
One thing I still did not get to work is the following: my source contains,
e.g.

<field name="name">Gordon</field>
<field name="firstName">Slash</field>

and I want this to get mapped to:

<name>Gordon, Slash</name>

I tried to use the described combination of equal and value mapping functoid
to extract firstName and name from the source document. Next I wanted to
concatenate those values using a string concatenation or a scripting functoid
by drawing links from the corresponding two value mapping functoids. Both
ways did not work. Maybe the problem is, that when one field associated with
one of the names is processed, the other field is not present, so I may need
to store the result of the processing until I'm processing the next name. Is
there a functoid type for such a purpose?

Cheers and thanx again

Slash



"Eric Stott" wrote:

> Well, it would help if I would read correctly your question, yes you want to
> use functoids.
>
> In your case you want to use the attribute to an equal functoid, then the
> second argument to the = being author, that would be connected to a value
> mapping(flattening) functoid and the second argument would be the actual
> value you want. The output of the value mapping would be to your
> destintation.
>
> This would repeat for all of your values.
>
> Hope that this helps,
> Eric
> http://stottcreations.com/blog
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com