Help on Adding Identity Constraint to an element [message #573486] |
Thu, 03 July 2003 06:49 |
Eclipse User |
|
|
|
Originally posted by: prabhakar.arunagiri.ssiworldwide.com
I am using eclipse to automatically generate a new schema (ie without gui
and using java) - wanted to know how to implement the following unique,key
and keyref constraints for a element as below
<xsd:element name="ROOT_ELEMENT" type="ROOT_ELEMENT">
<xsd:unique name="PERSON_PK">
<xsd:selector xpath="PERSON"/>
<xsd:field xpath="PERSON_ID"/>
</xsd:unique>
<xsd:key name="PERSON_KEY">
<xsd:selector xpath="PERSON"/>
<xsd:field xpath="PERSON_ID"/>
</xsd:key>
<xsd:keyref name="PERSON_FK" refer="PERSON_ID">
<xsd:selector xpath="MAILING_ADDRESS"/>
<xsd:field xpath="PERSON_ID"/>
</xsd:keyref>
</xsd:element>
<xsd:complexType name="ROOT_ELEMENT">
<xsd:sequence>
........ and expanding the complex type mentioned above
I had seen the XSDIdentityConstraintDefinition class with xpath, selector
etc and know that the functionality can be implemented.
Couldnt really add it to the schema (getting some exception or the
other)as there is no similar kind of example implementation
Request to help in this regard( with a code snippet may be!)
thanks & regards
prabhakar
|
|
|
Powered by
FUDForum. Page generated in 0.02474 seconds