49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
---+!! %TOPIC%
|
|
|
|
%META:TOPICINFO{author="JacobAsiedu" date="1160077299" format="1.1" version="1.1"}%
|
|
%META:TOPICPARENT{name="DiscussionFor1dot1RC2"}%
|
|
The uniqueness constraint(<nop>CharacterStateKey) on <nop>StateDefinition's ensure's that global states cannot be referenced more than once within Characters in a Terminology. This is because of <verbatim><xs:field xpath="@id|@ref"/></verbatim> in the identity constraint declaration.
|
|
|
|
This issue is illustrated with the example below. Attempting to reference 'efg301' more than once results in a validation error.
|
|
|
|
<verbatim>
|
|
...
|
|
<ConceptStates>
|
|
<StateDefinition id="efg301">
|
|
<Representation>
|
|
<Label xml:lang="en" audience="efg2">brown</Label>
|
|
</Representation>
|
|
</StateDefinition>
|
|
....
|
|
<CategoricalCharacter id="efg458">
|
|
<Representation>
|
|
<Label xml:lang="en" audience="efg2">Flower Color</Label>
|
|
</Representation>
|
|
<States>
|
|
<StateReference ref="efg301"/>
|
|
</States>
|
|
</CategoricalCharacter>
|
|
<CategoricalCharacter id="efg459">
|
|
<Representation>
|
|
<Label xml:lang="en" audience="efg2">Leaf Color</Label>
|
|
</Representation>
|
|
<States>
|
|
<StateReference ref="efg301"/>
|
|
</States>
|
|
</CategoricalCharacter>
|
|
</verbatim>
|
|
|
|
A solution will be to declare both <nop>ConceptStateKey and <nop>CharacterStateKey as follows
|
|
|
|
<verbatim>
|
|
<xs:unique name="SomeUniqueName">
|
|
|
|
<xs:selector xpath=".//u:StateDefinition"/>
|
|
<xs:field xpath="@id"/>
|
|
</xs:unique>
|
|
</verbatim>
|
|
|
|
This ensures that id's on <nop>StateDefinition's are unique throughout a document.
|
|
|
|
-- Main.JacobAsiedu - 05 Oct 2006
|