|
Home > Archive > BizTalk Server Orchestration > October 2004 > An XML element that may or may not exist
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 |
An XML element that may or may not exist
|
|
| TheNortonZ 2004-10-15, 9:09 pm |
| I have two schemas. I plan to map from the source schema to the destination
schema.
In some cases, the source schema may or may not have an element named
'Tested'. However, the destination schema has a place for the Tested
element.
How can you handle something like this in a map?
Thanks.
Norton
| |
|
| Hi Norton,
there is a functoid called "logical existence" (I think) with a questionmark
on. Try that !
"TheNortonZ" wrote:
> I have two schemas. I plan to map from the source schema to the destination
> schema.
>
> In some cases, the source schema may or may not have an element named
> 'Tested'. However, the destination schema has a place for the Tested
> element.
>
> How can you handle something like this in a map?
>
> Thanks.
>
> Norton
>
>
>
| |
| TheNortonZ 2004-10-15, 9:09 pm |
| Ok, looks like thats part of the solution. But it appears that if I set the
incoming schema element to optional (min occurs 0) and the source schema to
the same and place this functoid between the two, even if I have the element
in the incoming document, it does not appear in the destination.
Norton
"Jonas" <Jonas@discussions.microsoft.com> wrote in message
news:AD89D4AF-D76F-4047-8A7D-982BB39C0A04@microsoft.com...[vbcol=seagreen]
> Hi Norton,
>
> there is a functoid called "logical existence" (I think) with a
> questionmark
> on. Try that !
>
> "TheNortonZ" wrote:
>
| |
| Lars W. Andersen 2004-10-15, 9:09 pm |
| Hi Norton,
The "..existence" functoid is not enough on its own. You need to use it
together with e.g. the looping functoid to produce the resulting element.
If that is what you need to do? I don't fully understand your requirements.
If you describe your problem further I could help you some more.
regards
Lars
"TheNortonZ" <thenortonz@hotmail.com> wrote in message
news:OGK3lYesEHA.1400@TK2MSFTNGP11.phx.gbl...
> Ok, looks like thats part of the solution. But it appears that if I set
the
> incoming schema element to optional (min occurs 0) and the source schema
to
> the same and place this functoid between the two, even if I have the
element
> in the incoming document, it does not appear in the destination.
>
> Norton
> "Jonas" <Jonas@discussions.microsoft.com> wrote in message
> news:AD89D4AF-D76F-4047-8A7D-982BB39C0A04@microsoft.com...
>
>
| |
| TheNortonZ 2004-10-15, 9:09 pm |
| Lars,
Thanks!
Basically, the source document sometimes might have an element named
'Topper' and sometimes in may not. If it does not exist, they they don't
want to see it in the destination document.
So, I first used a logical existence functoid and then joined that to a
scripting functoid. So, I have what looks like this:
(Source schema)<Topper> --> Logical Existence Functoid --> Scripting
Functoid --->Destination schema <Topper>
(Source schema)<Topper> --> Scripting Functoid (same scripting funtoid as
above)
Both Topper elements are set to Min Occurs = 0.
The code inside my functoid is:
//param1 is from the logical existence functoid
//param2 is direct from the source schema Topper element
public string DetOutput(bool param1, string param2)
{
if (param1 == true)
{
return param2;
}
else
{
return "JuJu";
}
}
The JuJu is just a temporary test because it looks like the first part of
the 'if' is always getting selected. No matter how I create the input
document, I never see the output document with the value "JuJu".
Norton
"Lars W. Andersen" <lwa@maerskdata_nospamplease_.dk> wrote in message
news:ua3zigesEHA.3460@TK2MSFTNGP15.phx.gbl...
> Hi Norton,
>
> The "..existence" functoid is not enough on its own. You need to use it
> together with e.g. the looping functoid to produce the resulting element.
> If that is what you need to do? I don't fully understand your
> requirements.
> If you describe your problem further I could help you some more.
>
> regards
> Lars
>
> "TheNortonZ" <thenortonz@hotmail.com> wrote in message
> news:OGK3lYesEHA.1400@TK2MSFTNGP11.phx.gbl...
> the
> to
> element
>
>
| |
| TheNortonZ 2004-10-15, 9:09 pm |
| Got it!
(Source schema)<Topper> --> Logical Existence Functoid --> Value Mapping
functoid --->Destination schema <Topper>
(Source schema)<Topper> --> Value Mapping functoid(same value mapping
funtoid as above)
Thanks.
Norton
"Lars W. Andersen" <lwa@maerskdata_nospamplease_.dk> wrote in message
news:ua3zigesEHA.3460@TK2MSFTNGP15.phx.gbl...
> Hi Norton,
>
> The "..existence" functoid is not enough on its own. You need to use it
> together with e.g. the looping functoid to produce the resulting element.
> If that is what you need to do? I don't fully understand your
> requirements.
> If you describe your problem further I could help you some more.
>
> regards
> Lars
>
> "TheNortonZ" <thenortonz@hotmail.com> wrote in message
> news:OGK3lYesEHA.1400@TK2MSFTNGP11.phx.gbl...
> the
> to
> element
>
>
|
|
|
|
|