Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Help on Adding Identity Constraint to an element
Help on Adding Identity Constraint to an element [message #573486] Thu, 03 July 2003 02:49
Eclipse User
Originally posted by:

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:key name="PERSON_KEY">
<xsd:selector xpath="PERSON"/>
<xsd:field xpath="PERSON_ID"/>
<xsd:keyref name="PERSON_FK" refer="PERSON_ID">
<xsd:selector xpath="MAILING_ADDRESS"/>
<xsd:field xpath="PERSON_ID"/>
<xsd:complexType name="ROOT_ELEMENT">
........ 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
Previous Topic:getting elements
Next Topic:Loading Schema from JAR
Goto Forum:

Current Time: Sat Aug 23 09:36:25 EDT 2014

Powered by FUDForum. Page generated in 0.01570 seconds