|
next
|
Subject: RE: Generating one to many elements Author: (Deleted User) Date: 05 Jun 2003 01:31 PM
|
Hi, Chris.
yes. you can do it with mapper in GUI.
in the target schema, you need to right click on element and
choose "duplicate node", you need to duplicate as many times as your contact
type, in your case is 6.
then for each element, you need to set literal for
. for example, for element in source, you
need to set literal value as "DDI", then link
element in source into . for element in source,
you need to go to next and set
literal value as "FaxNumber" and link element in source into
...and so on.
let me know if this approach work for you.
song.
> -----Original Message-----
> From: stylus-studio-xslt Listmanager [mailto:listmanager@edn.exln.com]
> Sent: Thursday, June 05, 2003 12:00 PM
> To: Recipients of 'stylus-studio-xslt' suppressed
> Subject: Generating one to many elements
>
>
> From: "Chris Lindley"
>
> I'm doing an XML to XML mapping exercise. I have one element in
> my source which needs to generate multiple elements in the
> destination document. eg.
> <Contact>
> <Name>Fred Smith</Name>
> <Department>Despatch</Department>
> <InternalAddress>Room 101</InternalAddress>
> <DDI>0131 4960000</DDI>
> <Switchboard>012999999999</Switchboard>
> <Fax>01234567</Fax>
> <Telex>3456</Telex>
> <Email>fred@timber.example.com</Email>
> <Mobile>07700 900000</Mobile>
> </Contact>
>
> to generate
>
> <Contact>
> <ContactName>Fred Smith</ContactName>
> <ListOfContactNumber>
> <ContactNumber>
> <ContactNumberValue>012999999999</ContactNumberValue>
> <ContactNumberTypeCoded>SwitchBoard</ContactNumberTypeCoded>
> </ContactNumber>
> <ContactNumber>
> <ContactNumberValue>0131 4960000</ContactNumberValue>
> <ContactNumberTypeCoded>DDI</ContactNumberTypeCoded>
> </ContactNumber>
> <ContactNumber>
> <ContactNumberValue>01234567</ContactNumberValue>
> <ContactNumberTypeCoded>FaxNumber</ContactNumberTypeCoded>
> </ContactNumber>
> <ContactNumber>
> <ContactNumberValue>fred@timber.example.com</ContactNumbe
> rValue>
> <ContactNumberTypeCoded>EmailAddress</ContactNumberTypeCoded>
> </ContactNumber>
> </ListOfContactNumber>
> </Contact>
>
> Is this possible using the GUI? Thanks.
>
>
>
> To reply: mailto:stylus-studio-xslt.6747@edn.exln.com
> To start a new topic: mailto:stylus-studio-xslt@edn.exln.com
> To login: http://edn.exln.com/~SSDN
>
|
|
|
|