Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > mapping choice/equivalent elements in BT2004




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

cdovhgx is offline     mapping choice/equivalent elements in BT2004  
cdovhgx


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


Click Here to See the Profile for cdovhgx Click here to Send cdovhgx a Private Message Find more posts by cdovhgx Add cdovhgx to your buddy list
 
02-16-05 12:17 PM

Hello all,
 
Like a lot of people, I'm new to BT2004 and I've run into a hurdle.  I'm try
ing to use the whole power of xml schema by creating reusable types.  As suc
h, I'm trying to use abstract types as a basis of many of my types. for exam
ple, i have this classic test case:
 
<!-- BEGIN SNIPPIT -->
  <xs:element name="Shape" type="Shape"/>
 
  <complexType name="Shape" abstract="true">
    <sequence>
      <element name="Area" type="double" />
    </sequence>
  </complexType>

  <complexType name="Square">
    <complexContent>
      <extension base="Shape">
        <sequence>
          <element name="Length" type="double" />
          <element name="Width" type="double" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="Circle">
    <complexContent>
      <extension base="Shape">
        <sequence>
          <element name="Radius" type="double" />
        </sequence>
      </extension>
    </complexContent>
  </complexType> 
<!--  END SNIPPIT  -->

I'd like to simply map this to a simpler to understand ( for a non-programme
r ) xsd following this format:
<!--  BEGIN SNIPPIT  -->
  <xs:element name="Shape">
    <xs:complexType>
      <xs:sequence>
        <xs:choice>
          <xs:element name="Circle" type="Circle"/>
          <xs:element name="Square" type="Square"/>
        </xs:choice>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
<!--   END SNIPPIT   -->
 
My problem is I don't know how to map this using the biztalk mapper. Should 
I use a functoid? Should I connect both the 'derived' elements of 'area' to 
both choices? I just don't know how to proceed.
 
From all the times I've tried, I keep getting:  [The destination node "Area"
 is required but the source node "Area" is within a choice block.]  I get th
is for all the attributes...
 
Can anyone help or point me to WHERE on the net I can find an example of thi
s? Thus far, I've found only straight mapping examples... That's "cake"!  
I just can't map a choice / equivalent elemnet...
 
Thanks to anyone who responds,
 
cdovhgx




[ Post a follow-up to this message ]



    Re: mapping choice/equivalent elements in BT2004  
Matt Milner


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


 
02-17-05 07:46 AM

You'll need to use something like the logical existence functoid if you want
to check for your source element. The point of the error is that if your
choice is not there, then the outbound file will be invalid.  So, if you
can, setup your map so that regardless of whether there is your choice in
the source, the outbound doc will get something in it.

Matt


"cdovhgx" <cdovhgx.1kjtx1@mail.webservertalk.com> wrote in message
news:cdovhgx.1kjtx1@mail.webservertalk.com...
>
> Hello all,
>
> Like a lot of people, I'm new to BT2004 and I've run into a hurdle.
> I'm trying to use the whole power of xml schema by creating reusable
> types.  As such, I'm trying to use abstract types as a basis of many of
> my types. for example, i have this classic test case:
>
> <!-- BEGIN SNIPPIT -->
> <xs:element name="Shape" type="Shape"/>
>
> <complexType name="Shape" abstract="true">
> <sequence>
> <element name="Area" type="double" />
> </sequence>
> </complexType>
>
> <complexType name="Square">
> <complexContent>
> <extension base="Shape">
> <sequence>
> <element name="Length" type="double" />
> <element name="Width" type="double" />
> </sequence>
> </extension>
> </complexContent>
> </complexType>
>
> <complexType name="Circle">
> <complexContent>
> <extension base="Shape">
> <sequence>
> <element name="Radius" type="double" />
> </sequence>
> </extension>
> </complexContent>
> </complexType>
> <!--  END SNIPPIT  -->
>
> I'd like to simply map this to a simpler to understand ( for a
> non-programmer ) xsd following this format:
> <!--  BEGIN SNIPPIT  -->
> <xs:element name="Shape">
> <xs:complexType>
> <xs:sequence>
> <xs:choice>
> <xs:element name="Circle" type="Circle"/>
> <xs:element name="Square" type="Square"/>
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <!--   END SNIPPIT   -->
>
> My problem is I don't know how to map this using the biztalk mapper.
> Should I use a functoid? Should I connect both the 'derived' elements
> of 'area' to both choices? I just don't know how to proceed.
>
> From all the times I've tried, I keep getting:  [The destination node
> "Area" is required but the source node "Area" is within a choice
> block.]  I get this for all the attributes...
>
> Can anyone help or point me to WHERE on the net I can find an example
> of this? Thus far, I've found only straight mapping examples... That's
> "cake"!  I just can't map a choice / equivalent elemnet...
>
> Thanks to anyone who responds,
>
> cdovhgx
>
>
>
> --
> cdovhgx
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message922131.html
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:48 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
 

Back To The Top
Home | Usercp | Faq | Register