J
J E E
Hi,
Why can't I create a key and keyref with an attribute declared in an
attribute group? Code below describes what I'm trying to accomplish.
<!-- An attribute group -->
<xs:attributeGroup name="AttGMain">
<xs:attribute name="Name" type="xs:string" />
<xs:attribute name="Type" type="xs:string" />
</xs:attributeGroup>
<!-- CT using group above -->
<xs:complexType name="ctView">
<xs:all>
<xs:element name="Control" type="ctControl" />
<xs:element name="InfoView" type="ctInfoView" />
</xs:all>
<xs:attributeGroup ref="AttGMain" />
</xs:complexType>
<!-- CT using CT above for View element -->
<xs:complexType name="ctViewGroup">
<xs:sequence>
<xs:element name="View" type="ctView">
<xs:key name="ViewPK">
<xs:selector xpath="." />
<xs:field xpath="@Name" />
</xs:key>
<xs:keyref id="ViewFK" refer="ViewPK">
<xs:selector xpath=".//View" />
<xs:field xpath="@Name" />
</xs:keyref>
</xs:element>
</xs:sequence>
</xs:complexType>
No relations are defined when I use Name attribute in a group, but
works when Name is declared local in ctView.
Regards,
J E E
Why can't I create a key and keyref with an attribute declared in an
attribute group? Code below describes what I'm trying to accomplish.
<!-- An attribute group -->
<xs:attributeGroup name="AttGMain">
<xs:attribute name="Name" type="xs:string" />
<xs:attribute name="Type" type="xs:string" />
</xs:attributeGroup>
<!-- CT using group above -->
<xs:complexType name="ctView">
<xs:all>
<xs:element name="Control" type="ctControl" />
<xs:element name="InfoView" type="ctInfoView" />
</xs:all>
<xs:attributeGroup ref="AttGMain" />
</xs:complexType>
<!-- CT using CT above for View element -->
<xs:complexType name="ctViewGroup">
<xs:sequence>
<xs:element name="View" type="ctView">
<xs:key name="ViewPK">
<xs:selector xpath="." />
<xs:field xpath="@Name" />
</xs:key>
<xs:keyref id="ViewFK" refer="ViewPK">
<xs:selector xpath=".//View" />
<xs:field xpath="@Name" />
</xs:keyref>
</xs:element>
</xs:sequence>
</xs:complexType>
No relations are defined when I use Name attribute in a group, but
works when Name is declared local in ctView.
Regards,
J E E