An XML element that may or may not exist
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 Orchestration > An XML element that may or may not exist




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    An XML element that may or may not exist  
TheNortonZ


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


 
10-16-04 02:09 AM

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







[ Post a follow-up to this message ]



    RE: An XML element that may or may not exist  
Jonas


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


 
10-16-04 02:09 AM

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 destinatio
n
> 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
>
>
>





[ Post a follow-up to this message ]



    Re: An XML element that may or may not exist  
TheNortonZ


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


 
10-16-04 02:09 AM

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:
> 







[ Post a follow-up to this message ]



    Re: An XML element that may or may not exist  
Lars W. Andersen


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


 
10-16-04 02:09 AM

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... 
>
>







[ Post a follow-up to this message ]



    Re: An XML element that may or may not exist  
TheNortonZ


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


 
10-16-04 02:09 AM

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







[ Post a follow-up to this message ]



    Re: An XML element that may or may not exist  
TheNortonZ


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


 
10-16-04 02:09 AM

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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:30 PM.      Post New Thread    Post A Reply      
  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