RE: Value Mapping to Root Node

From: larry franks (larryfr_at_online.microsoft.com)
Date: 11/16/04


Date: Tue, 16 Nov 2004 22:33:04 GMT

Sure, here it is without attachments:
schema1.xsd
=================
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://newsgroup.Schema1"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://newsgroup.Schema1"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Root">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" name="ProdSpec">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="1" name="Name"
type="xs:string" />
              <xs:element minOccurs="1" maxOccurs="1" name="Value"
type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
=================

schema2.xsd
=================
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://newsgroup.Schema2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://newsgroup.Schema2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Order">
    <xs:complexType>
      <xs:attribute name="Product" type="xs:string" />
      <xs:attribute name="value" type="xs:string" />
    </xs:complexType>
  </xs:element>
</xs:schema>
=================

map1.btm
=================
<?xml version="1.0" encoding="utf-16"?>
<!-- Generated using BizTalk Mapper on Fri, Nov 12 2004 03:09:37 AM -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<mapsource Name="BizTalk Map" BizTalkServerMapperTool_Version="2.0"
Version="2" XRange="100" YRange="420" OmitXmlDeclaration="Yes" CopyPIs="No"
method="xml" xmlVersion="1.0"
IgnoreNamespacesForLinks="Yes"><SrcTree><Reference
Location=".\Schema1.xsd"/></SrcTree><TrgTree><Reference
Location=".\Schema2.xsd"/></TrgTree><ScriptTypePrecedence><CSharp
Enabled="Yes"/><ExternalAssembly Enabled="Yes"/><VbNet
Enabled="Yes"/><JScript Enabled="Yes"/><XsltCallTemplate
Enabled="Yes"/><Xslt
Enabled="Yes"/></ScriptTypePrecedence><TreeValues><TestValues/><ConstantValu
es/></TreeValues><Pages><Page Name="Page 1"><Links><Link LinkID="1"
LinkFrom="1"
LinkTo="/*[local-name()='&lt;Schema&gt;']/*[local-name()='Order']/@*[local-n
ame()='Product']" Label=""/><Link LinkID="2" LinkFrom="2"
LinkTo="/*[local-name()='&lt;Schema&gt;']/*[local-name()='Order']/@*[local-n
ame()='value']" Label=""/><Link LinkID="3"
LinkFrom="/*[local-name()='&lt;Schema&gt;']/*[local-name()='Root']/*[local-n
ame()='ProdSpec']" LinkTo="3" Label=""/><Link LinkID="4" LinkFrom="3"
LinkTo="1" Label=""/><Link LinkID="5" LinkFrom="3" LinkTo="2"
Label=""/><Link LinkID="6"
LinkFrom="/*[local-name()='&lt;Schema&gt;']/*[local-name()='Root']/*[local-n
ame()='ProdSpec']/*[local-name()='Name']" LinkTo="1" Label=""/><Link
LinkID="7"
LinkFrom="/*[local-name()='&lt;Schema&gt;']/*[local-name()='Root']/*[local-n
ame()='ProdSpec']/*[local-name()='Value']" LinkTo="2"
Label=""/></Links><Functoids><Functoid FunctoidID="1" X-Cell="54"
Y-Cell="212" Functoid-FID="374" Functoid-Name="Value Mapping (Flattening)"
Label=""><Input-Parameters><Parameter Type="Link" Value="4"
Guid="{DECA6249-C76E-48C6-B934-75F3E9C142F4}"/><Parameter Type="Link"
Value="6"
Guid="{2E4766AB-1220-4089-B476-43624BFB0259}"/></Input-Parameters></Functoid
><Functoid FunctoidID="2" X-Cell="54" Y-Cell="213" Functoid-FID="374"
Functoid-Name="Value Mapping (Flattening)"
Label=""><Input-Parameters><Parameter Type="Link" Value="5"
Guid="{83F62960-3FD2-4820-80F3-E85E34141E1A}"/><Parameter Type="Link"
Value="7"
Guid="{5E5C151A-0347-4102-8AE3-3DC7052238F7}"/></Input-Parameters></Functoid
><Functoid FunctoidID="3" X-Cell="51" Y-Cell="212" Functoid-FID="701"
Functoid-Name="Logical Existence" Label=""><Input-Parameters><Parameter
Type="Link" Value="3"
Guid="{1058FF80-6BEB-4417-94DF-B46FFD69733E}"/></Input-Parameters></Functoid
></Functoids></Page></Pages></mapsource>
=================
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: AcTLa98mClve497VSEOElpBdONZqHg==
| X-WBNR-Posting-Host: 207.241.20.65
| From: =?Utf-8?B?ZGF2ZSB2?= <daveV.0711.2828@noemail.nospam>
| References: <5B0D3B40-CF79-4000-A5E8-21B1B99CB655@microsoft.com>
<alCqrsDyEHA.3956@cpmsftngxa10.phx.gbl>
<$nwc9RPyEHA.2916@cpmsftngxa10.phx.gbl>
| Subject: RE: Value Mapping to Root Node
| Date: Mon, 15 Nov 2004 15:36:03 -0800
| Lines: 121
| Message-ID: <650A67FC-48DE-4549-8050-8157F65BC318@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:21678
| X-Tomcat-NG: microsoft.public.biztalk.general
|
| 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 2004 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 2004 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
| > | |
| > |
| > |
|



Relevant Pages

  • Re: Value Mapping to Root Node
    ... Larry Franks ... This posting is provided "AS IS" with no warranties,and confers no rights. ... | | Subject: Re: Value Mapping to Root Node ... The destination is an Attunity database interaction schema, ...
    (microsoft.public.biztalk.general)
  • Re: BizTalk 2004 Configuration Data
    ... Larry Franks ... This posting is provided "AS IS" with no warranties,and confers no rights. ... | Thread-Topic: BizTalk 2004 Configuration Data ... | Content-Type: text/plain; ...
    (microsoft.public.biztalk.general)
  • RE: BizTalk.SendHTTPX.1 server odd-size(1000 bit) certificate issue
    ... what version of BizTalk and what service pack level? ... Larry Franks ... | Content-Type: text/plain ... | for certificate since the root certifcate has been installed correctly on ...
    (microsoft.public.biztalk.server)
  • RE: Envelope??
    ... Larry Franks ... This posting is provided "AS IS" with no warranties,and confers no rights. ... | Content-Type: text/plain; ... Microsoft CDO for Windows 2000 ...
    (microsoft.public.biztalk.general)

Loading