XML 스키마에서 ID 필드를 구별 할 수 있는지 궁금합니다. 다음 스키마가 있습니다.XML 스키마 (XSD)에서 여러 ID 참조
<element name="define_apple">
<complexType>
<attribute name="colour" type="ID"/>
</complexType>
</element>
<element name="define_orange">
<complexType>
<attribute name="colour" type="ID"/>
</complexType>
</element>
<element name="reference_apple">
<complexType>
<attribute name="colour" type="IDREF"/>
</complexType>
</element>
<element name="reference_orange">
<complexType>
<attribute name="colour" type="IDREF"/>
</complexType>
</element>
그러나 참조는 각각의 정의와 고유하게 연결되어 있지 않습니다.
<define_apple colour="green"/>
<define_orange colour="orange"/>
<reference_apple colour="orange"/>
<reference_orange colour="green"/>
제대로 네임 스페이스를 사용하여 예를 들어, ID 및 IDREF를 사용하여 필드를 연결하는 방법이 있나요 : 나는 아직도 다음과 같은 말도 있지만 유효한 XML을 쓸 수 있습니까? 나는 key와 keyref를 사용할 수 있다는 것을 알고 있지만 ID는 좀 더 호소력이있다.
수치심 ... 이것을 지적 해 주셔서 감사합니다. – DonDiesl