1
引用MSH_25_GLO_DEF模式我已经建立了与BTAHL7V2X模式(MSH_25_GLO_DEF等)的组件。如何从其他组件/架构
在另一组件中,我需要创建一个模式,其中所述元件中的一个的类型是MSH_25_GLO_DEF的。
在我BTAHL7V2XCommon组装我:
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://microsoft.com/HealthCare/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo root_reference="MSH_25_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="MSH_25_GLO_DEF">
...
在我的其他组件,我有一个模式,它看起来像:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://mycompany.com/Custom/HL7/2X" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://mycompany.com/Custom/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" namespace="http://mycompany.com/Custom/HL7/2X"/>
<xs:include schemaLocation="ORU_R01_23_GLO_DEF.xsd" />
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standards_version="HL7.DBVersion.1_5" document_type="HL7 2X Schema" version="2.0.0104.0.2.0" root_reference="ORU_R01_23_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
<b:references>
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/DataTypes" />
<b:reference targetNamespace="http://microsoft.com/HealthCare/HL7/2X" />
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Segments" />
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Tables" />
</b:references>
</xs:appinfo>
</xs:annotation>
<xs:element name="ORU_R01_23_ALL">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="MSH_25_GLO_DEF" type="ns0:MSH_25_GLO_DEF" />
<xs:element minOccurs="1" maxOccurs="1" ref="ORU_R01_23_GLO_DEF" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
我已经加入到其中包含BTAHL7V2X集的引用在MSH头,我可以看到MSH_25_GLO_DEF如果我查看对象浏览器中引用的程序集,但我总是得到一个错误,指出“http://microsoft.com/HealthCare/HL7/2X:MSH_25_GLO_DEF未声明,当我认为我的架构。
我也试图改变进口提及的包括:
<xs:include schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" />
,但得到vieweing架构时,不同的错误:
The targetNamespace 'http://microsoft.com/HealthCare/HL7/2X' of included/redefined schema should be the same as the targetNamespace 'http://mycompany.com/Custom/HL7/2X' of the including schema.
是否有参考BizTalk架构在另一有道部件?
欢迎堆栈溢出!虽然这可能在理论上回答这个问题,[这将是更可取的](http://meta.stackexchange.com/q/8259)在这里包括答案的重要部分,并提供供参考的链接。 – JJJ 2013-03-18 20:09:40
嗨Juhana - 我编辑Nihar的答案,并添加必要的细节 – Jeremy 2013-03-18 22:24:45