|
Home > Archive > BizTalk Server General > December 2004 > Strange behavior of BizTalk Mapper
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]
| Author |
Strange behavior of BizTalk Mapper
|
|
| Whitebear 2004-12-22, 5:52 pm |
| Hello! I reproduce my problem on this sample:
I have 3 schemas: schema A with targetNamespace="aaa" and one xs:string
element with name A, schema E with empty namespace (targetNamespace omitted)
and one xs:string element with name E, and schema B with
targetNamespace="bbb" and one record with name "B", that contains element of
type that is referenced from schema E. All three schemas are shown below:
<!--file a.xsd-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="aaa">
<xs:element name="a" type="xs:string" />
</xs:schema>
<!--file empty.xsd-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="e" type="xs:string" />
</xs:schema>
<!--file b.xsd-->
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
elementFormDefault="qualified" targetNamespace="bbb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation=".\empty.xsd" />
<xs:element name="b">
<xs:complexType>
<xs:sequence>
<xs:element ref="e" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Notice, that "Generate Instance" on b.xsd works fine.
After that, I create simple btm: map from a.xsd to b.xsd and element "a" is
mapped to element "e". Content of btm is shown below:
<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=".\a.xsd"/></SrcTree><TrgTree><Reference
Location=".\b.xsd"/></TrgTree><ScriptTypePrecedence><CSharp
Enabled="Yes"/><ExternalAssembly Enabled="Yes"/><VbNet
Enabled="Yes"/><JScript Enabled="Yes"/><XsltCallTemplate Enabled="Yes"/><Xslt
Enabled="Yes"/></ScriptTypePrecedence><TreeValues><TestValues/><ConstantValues/></TreeValues><Pages><Page
Name="Page 1"><Links><Link LinkID="1"
LinkFrom="/*[local-name()='<Schema>']/*[local-name()='a']"
LinkTo="/*[local-name()='<Schema>']/*[local-name()='b']/*[local-name()='e']"
Label=""/></Links><Functoids/></Page></Pages></mapsource>
When I test this map I get error "Exception Caught: Cannot use a prefix with
an empty namespace.". I think BizTalk mapper tries to qualify namespace for
element "e" and encounters violation of xml-schema rules. But schema for
element "b" is valid. What should I do in this case to avoid error?
Thank you
| |
| Tan Bao Nguyen 2004-12-22, 5:52 pm |
| Could you send me your schemas, map, and input files?
Regards,
Tan Nguyen
Microsoft BizTalk Server
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------[vbcol=seagreen]
omitted)[vbcol=seagreen]
of[vbcol=seagreen]
targetNamespace="aaa">[vbcol=seagreen]
is[vbcol=seagreen]
CopyPIs="No"[vbcol=seagreen]
Enabled="Yes"/><Xslt[vbcol=seagreen]
lues/></TreeValues><Pages><Page[vbcol=seagreen]
]"[vbcol=seagreen]
with[vbcol=seagreen]
for[vbcol=seagreen]
| |
| Whitebear 2004-12-23, 5:51 pm |
| I did it, but I'm not sure if your real email is a displayed one without
"online" suffix... Anyway, it was the rule that I used to construct your
e-mail 
"Tan Bao Nguyen" <tanbn@online.microsoft.com> wrote in message
news:rKM5WxF6EHA.1392@cpmsftngxa10.phx.gbl...
> Could you send me your schemas, map, and input files?
>
> Regards,
> Tan Nguyen
> Microsoft BizTalk Server
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> --------------------
> omitted)
element[vbcol=seagreen]
> of
below:[vbcol=seagreen]
> targetNamespace="aaa">
> is
> CopyPIs="No"
> Enabled="Yes"/><Xslt
>
> lues/></TreeValues><Pages><Page
>
> ]"
> with
> for
>
| |
| Tan Bao Nguyen 2004-12-30, 5:52 pm |
| You're correct; that is to remove the "online" word in the email. But note
that I did not receive files. Could you try again?
Regards,
Tan Nguyen
Microsoft BizTalk Server
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------[vbcol=seagreen]
<rKM5WxF6EHA.1392@cpmsftngxa10.phx.gbl>[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl[vbcol=seagreen]
xs:string[vbcol=seagreen]
"a"[vbcol=seagreen]
Va[vbcol=seagreen]
e'[vbcol=seagreen]
prefix[vbcol=seagreen]
namespace[vbcol=seagreen]
for[vbcol=seagreen]
|
|
|
|
|