![]() |
|
|
|
|
|
|
|
|
3
3rd July 21:21
External User
Posts: 1
|
The Mapper can't create create nodes at runtime. A way to do it is to use
the scripting functoid and write the XSLT. Regards, Tan Nguyen Microsoft BizTalk Server This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- | From: christopherkilmer@gmail.com | Newsgroups: microsoft.public.biztalk.tools | Subject: Mapper - create nodes dynamically | Date: 3 Oct 2005 17:58:51 -0700 | Organization: http://groups.google.com | Lines: 45 | Message-ID: <1128387531.355971.93160@g14g2000cwa.googlegroups. com> | NNTP-Posting-Host: 67.183.219.196 | Mime-Version: 1.0 | Content-Type: text/plain; charset="iso-8859-1" | X-Trace: posting.google.com 1128387536 1817 127.0.0.1 (4 Oct 2005 00:58:56 GMT) | X-Complaints-To: groups-abuse@google.com | NNTP-Posting-Date: Tue, 4 Oct 2005 00:58:56 +0000 (UTC) | User-Agent: G2/0.2 | X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; ..NET CLR 1.1.4322),gzip(gfe),gzip(gfe) | Complaints-To: groups-abuse@google.com | Injection-Info: g14g2000cwa.googlegroups.com; posting-host=67.183.219.196; | posting-account=uQmIAg0AAACAOWVD-ZoGlU4UmyX4qybq | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan ews.com!postnews.google.com!g14g2000cwa.googlegrou ps.com!not-for-mail | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.biztalk.tools:1000 | X-Tomcat-NG: microsoft.public.biztalk.tools | | I'm trying to use the BTS Mapper to | | I have the following xml: | | <Buyers> | <Buyer> | <BuyerIndex>1</BuyerIndex> | <Name>Super Co</Name> | <Address>555 Cherry Lane</Address> | </Buyer> | <Buyer> | <BuyerIndex>2</BuyerIndex> | <Name>Microsoft</Name> | <Address>1 Microsoft Way</Address> | </Buyer> | </Buyers> | | Which needs to be converted to: | <Results> | <Byr1Name1>Super Co</Byr1Name1> | <Byr1Addr1>555 Cherry Lane</Byr1Addr1> | <Byr2Name1>Microsoft</Byr2Name1> | <Byr2Addr1>1 Microsoft Way</Byr2Addr1> | </Results> | | You can think of the results schema as looking something like: | | <Results> | <Any/> <!-- All nodes below root are created at runtime --> | </Results> | | If another buyer is added to the source schema, then new nodes name | <Byr3Name1> and <Byr3Addr1> need to be added. | | Because there can be any number of buyers in the source schema, the | destination schema can have any number of <ByrXName1></ByrXName1> and | <ByrXAddr1></ByrXAddr1> nodes. This means that I don't know the | actual names of the nodes in the destination schema until the | transformation takes place. | | I'm assuming that an <Any/> node is involved in the destination schema | somehow. However, I don't know how to actually create the new node | using the mapper. Any tips you could provide would be much | appreciated. | | |
|