1. Problem
You need to create two schemas
that have the same name for the root node.
2. Solution
BizTalk Server uses a combination of namespaces and root nodes to
resolve schema references. Therefore, it is possible to have two schemas
with the same root node as long as their namespace designation is
different. By default, the BizTalk Editor will set the namespace of a
schema to http://[solution].[schema], where solution refers to the name of the solution file and schema refers to the name of the schema file. This default
namespace designation may be modified as follows:
Open
the project that contains the schema.
Double-click the schema
to open it.
Select the <Schema> node.
Right-click and select
Properties.
Modify the Target Namespace property as
desired.
When you modify the Target Namespace
property, BizTalk Server will automatically modify the Default
Namespace (element name xmlns) of the schema to match the Target
Namespace. Once the two schemas with the
same root node have different namespace designations, they may be used
without any conflicts.
3. How It Works
Namespaces are used to
allow elements and attributes from different schemas to share names. For
example, two schemas may have an element named FirstName. If the schemas did not have different namespaces,
BizTalk Server would not know which FirstName you were referencing. In addition to adopting naming
standards and conventions for all BizTalk artifacts, you should adopt a
standard for namespaces in schemas. An example of a standard is as
follows:
http://[Company Name].[Project].BizTalk.Schemas.[Schema].[Version]
where Company Name is your company name, Project
is the name of the project, Schema is the name of the schema,
and Version is the version number of the schema.
NOTE
"EDI" should not be used in
the namespace of any project that uses the BizTalk EDI engine. During
runtime, you may run into conflicts with this that will not allow your
components to function as expected.