|
Home > Archive > BizTalk Server General > April 2005 > Mapping Question?
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]
|
|
|
| Hi there:
I am trying to map a source schema
<xs:complexType>
<xs:sequence>
<xs:element name="Record1">
<xs:complexType>
<xs:sequence>
<xs:element name="FirstName" type="xs:string" />
<xs:element name="LastName" type="xs:string" />
<xs:element name="Address" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="State" type="xs:string" />
<xs:element name="Zip" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Record2">
<xs:complexType>
<xs:sequence>
<xs:element name="FirstName" type="xs:string" />
<xs:element name="LastName" type="xs:string" />
<xs:element name="Address" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="State" type="xs:string" />
<xs:element name="Zip" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
that look like the above to a destination schema.
<xs:element name="Dest">
<xs:complexType>
<xs:sequence>
<xs:element name="Record1">
<xs:complexType>
<xs:sequence>
<xs:element name="Identity" type="xs:string" />
<xs:element name="FirstName" type="xs:string" />
<xs:element name="LastName" type="xs:string" />
<xs:element name="Address" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="State" type="xs:string" />
<xs:element name="Zip" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
What I am trying to do is - if elements is Record1, I want "Identity" node
to be '00' and if element is Record2, the same "Identity" to be '01' in the
destination schema. Is this possible? If so, can you help me? I am thinking
of writing an inline XSLT to do this. Guide me to a quicker method if you can.
Thanks,
Shamod
| |
| Matt Milner 2005-04-14, 2:49 am |
| The iterator functoid should give you the index of the loop which is what
you want. You should be able to use some string concat and simple math
functoids to get the format you want.
Matt
"Sam" <Sam@discussions.microsoft.com> wrote in message
news:E8C1D497-AC7D-401E-9A72-F29DBA5181FC@microsoft.com...
> Hi there:
>
> I am trying to map a source schema
>
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Record1">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="FirstName" type="xs:string" />
> <xs:element name="LastName" type="xs:string" />
> <xs:element name="Address" type="xs:string" />
> <xs:element name="City" type="xs:string" />
> <xs:element name="State" type="xs:string" />
> <xs:element name="Zip" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="Record2">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="FirstName" type="xs:string" />
> <xs:element name="LastName" type="xs:string" />
> <xs:element name="Address" type="xs:string" />
> <xs:element name="City" type="xs:string" />
> <xs:element name="State" type="xs:string" />
> <xs:element name="Zip" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> that look like the above to a destination schema.
>
> <xs:element name="Dest">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Record1">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Identity" type="xs:string" />
> <xs:element name="FirstName" type="xs:string" />
> <xs:element name="LastName" type="xs:string" />
> <xs:element name="Address" type="xs:string" />
> <xs:element name="City" type="xs:string" />
> <xs:element name="State" type="xs:string" />
> <xs:element name="Zip" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> What I am trying to do is - if elements is Record1, I want "Identity" node
> to be '00' and if element is Record2, the same "Identity" to be '01' in
> the
> destination schema. Is this possible? If so, can you help me? I am
> thinking
> of writing an inline XSLT to do this. Guide me to a quicker method if you
> can.
>
> Thanks,
> Shamod
|
|
|
|
|