私はthis schemaでの作業、およびキーのセクションで、次の気づいています:両方のキーは、このセクションを参照している2つのxs:複合キーと同じキーですか?
<xs:key name="KeyAnalysisType">
<xs:selector xpath="MasterFiles/AnalysisTypeTable/AnalysisTypeTableEntry"/>
<xs:field xpath="AnalysisType"/>
</xs:key>
<xs:key name="KeyAnalysisID">
<xs:selector xpath="MasterFiles/AnalysisTypeTable/AnalysisTypeTableEntry"/>
<xs:field xpath="AnalysisID"/>
</xs:key>
:
<xs:element name="AnalysisTypeTable" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="AnalysisTypeTableEntry" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AnalysisType" type="FAIAcodeType">
<xs:annotation>
<xs:documentation>Analysis type identifier: e.g. CC (for Cost Center), DEP (for department), etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AnalysisTypeDescription" type="FAIAlongtextType">
<xs:annotation>
<xs:documentation>Description of the AnalysisType, e.g. "Cost Center"</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AnalysisID" type="FAIAmiddle1textType">
<xs:annotation>
<xs:documentation>Analysis ID: e.g. 1200-HDOF-TR (for cost center treasury in the headoffice) </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AnalysisIDDescription" type="FAIAlongtextType">
<xs:annotation>
<xs:documentation>Description of the AnalysisID: e.g. "Headoffice-Treasury".</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
だろうと同じように、この二重のキー定義作業両方のフィールドを選択する合成キー?例えば。
<xs:key name="CompositeKeyAnalysis">
<xs:selector xpath="MasterFiles/AnalysisTypeTable/AnalysisTypeTableEntry"/>
<xs:field xpath="AnalysisID"/>
<xs:field xpath="AnalysisType"/>
</xs:key>
こんにちは、マイク、私はおそらくですここでは何かが欠落していますが、例えば、(ID、タイプ)の(1,3)、(1,4)、(2,3)、(2,4)のノードがある場合)、インスタンスはすべてのタプルが一意ですが、2つのキーのいずれかに別々に(複合1など)はないので、複合キーに対して有効でしょうか? –
はい。あなたは大丈夫です。私は逃しました。 –