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