Title: Unique Constraint

Rajiv & Brain,

 

Thanks for your responses.

I am not calling validate(XmlOptions).

I expect it to be validated when I call RootElementDocumentFactory.parse(InputStream).

Why should I explicitly call validate ()?

Did I understand right?

 

Thanks,

Mani

 

 

 


From: Rajiv Balachandran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 01, 2005 6:49 PM
To: [email protected]
Subject: RE: Unique Constraint

 

Hi Mani,

 

It would be helpful to see the entire schema that you have to see why this is happening. XmlBeans does have some JUnit tests cases for the unique constraint. These gives a good idea of the usage. You will need to check out the svn sources for this. The test schema can be found at svnroot\test\cases\xbean\scomp\idConstraints\Constraint.xsd and Junit cases can be found at svnroot\test\src\scomp\idConstraint\detailed\KeyKeyref.java (testUnique(),testUniqueIllegal1(),testUniqueIllegal2()).

 

Hope this helps.

 

Rajiv

 

 

 


From: Chandra, Mani [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 01, 2005 2:17 PM
To: '[email protected]'
Subject: Unique Constraint

 

Hi All,

I have defined a UNIQUE constraint for my schema and the constraint is not validated when I parse the XML.

Any light on this?

                <xs:unique name="mykey">

                        <xs:selector xpath="Item"/>

                        <xs:field xpath="item"/>

                </xs:unique>

Thanks & Regards,

Mani

 

Reply via email to