Skip to main content

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 06:49
Eclipse UserFriend
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: Tue Aug 04 18:26:22 GMT 2020

Powered by FUDForum. Page generated in 0.01887 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top