RE: Value Mapping to Root Node

From: dave v (daveV.0711.2828_at_noemail.nospam)
Date: 11/15/04


Date: Mon, 15 Nov 2021 15:36:03 -0800

Larry -

Your last post was cut off somehow. I don't see any links to your sample.
Could you re-post so I can take a look?

Thanks,
Dave

""larry franks"" wrote:

> including sample schemas and map. I tried setting up a simple sample and
> am not able to reproduce the problem. Can you take a look at these files
> and see if this helps with what you are seeing? If not, would it be
> possible to post your project?
>
>
> Larry Franks
>
> This posting is provided "AS IS" with no warranties,and confers no rights.
> Subscribe at
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
> --------------------
> | X-Tomcat-ID: 621827380
> | References: <5B0D3B40-CF79-4000-A5E8-21B1B99CB655@microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain
> | Content-Transfer-Encoding: 7bit
> | From: larryfr@online.microsoft.com ("larry franks")
> | Organization: Microsoft
> | Date: Thu, 11 Nov 2021 22:09:40 GMT
> | Subject: RE: Value Mapping to Root Node
> | X-Tomcat-NG: microsoft.public.biztalk.general
> | Message-ID: <alCqrsDyEHA.3956@cpmsftngxa10.phx.gbl>
> | Newsgroups: microsoft.public.biztalk.general
> | Lines: 63
> | Path: cpmsftngxa10.phx.gbl
> | Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:21571
> | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
> |
> | I haven't ran into this before Dave, let me give this a try and see what
> I
> | can find on it.
> |
> | Larry Franks
> |
> | This posting is provided "AS IS" with no warranties,and confers no
> rights.
> | Subscribe at
> |
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> | &SD=msdn
> | --------------------
> | | Thread-Topic: Value Mapping to Root Node
> | | thread-index: AcTHgLIFw1TC/fW5SX6ArfRYIEEdAQ==
> | | X-WBNR-Posting-Host: 207.241.20.65
> | | From: =?Utf-8?B?ZGF2ZSB2?= <daveV.0711.2828@noemail.nospam>
> | | Subject: Value Mapping to Root Node
> | | Date: Wed, 10 Nov 2021 15:55:02 -0800
> | | Lines: 38
> | | Message-ID: <5B0D3B40-CF79-4000-A5E8-21B1B99CB655@microsoft.com>
> | | MIME-Version: 1.0
> | | Content-Type: text/plain;
> | | charset="Utf-8"
> | | Content-Transfer-Encoding: 7bit
> | | X-Newsreader: Microsoft CDO for Windows 2000
> | | Content-Class: urn:content-classes:message
> | | Importance: normal
> | | Priority: normal
> | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | | Newsgroups: microsoft.public.biztalk.general
> | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | | Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:21527
> | | X-Tomcat-NG: microsoft.public.biztalk.general
> | |
> | | I have source doc like this:
> | | <ns0:Root xmlns:ns0="http://TestBTSStuff.ValueMapExpanded">
> | | <ProdSpec>
> | | <Name>Name</Name>
> | | <Value>Widget</Value>
> | | </ProdSpec>
> | | <ProdSpec>
> | | <Name>Price</Name>
> | | <Value>1000.99</Value>
> | | </ProdSpec>
> | | <ProdSpec>
> | | <Name>Quantity</Name>
> | | <Value>550</Value>
> | | </ProdSpec>
> | | </ns0:Root>
> | |
> | | Which I can to map to the following using the Value Mapping
> (Flattening)
> | | functoids:
> | | <ns0:Root xmlns:ns0="http://TestBTSStuff.ValueMapFlattened">
> | | <Order Product="Widget" Price="550" Qty="1000.99" />
> | | </ns0:Root>
> | |
> | | However, when my target schema has "Order" as the root node, like:
> | | <ns0:Order Product="Widget" Price="550" Qty="1000.99"
> | | xmlns:ns0="http://TestBTSStuff.ValueMapFlattened2" />
> | |
> | | The map doesn't work as before. The output looks like:
> | | <ns0:Order Product="Widget"
> | | xmlns:ns0="http://TestBTSStuff.ValueMapFlattened2" />
> | |
> | | "Price" and "Quantity" don't map over in this case. In fact, it will
> | always
> | | only map the first <ProdSpec> node. The map is exactly the same as the
> | first,
> | | without the "Root" node.
> | |
> | | Does anyone know how to flatten to the root node without using custom
> | XSLT?
> | |
> | | Thanks,
> | | Dave
> | |
> |
> |