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 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
Previous Topic:getting elements
Next Topic:Loading Schema from JAR
Goto Forum:
  


Current Time: Sun Oct 26 08:37:50 GMT 2014

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

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