Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XSD assert(error on assert)
XSD assert [message #1785778] Thu, 19 April 2018 15:22 Go to next message
bart grrr is currently offline bart grrrFriend
Messages: 1
Registered: April 2018
Junior Member
XML XSD vaildation gives an error on my assert (XSD 1.1)
element policyHolderFirstName is mandatory if policyHolderCompanyFlag is 'n'.

Can anyone help me please!!! It's urgent.

The error that I get: S4s-elt-invalid-content.1: The Content Of '#AnonType_policyHolder' Is Invalid. Element 'assert' Is Invalid, Misplaced, Or Occurs Too Often.

<xs:element name="policyHolder">
<xs:element name="policyHolderCompanyFlag" type="booleanType" />
<xs:element name="policyHolderFirstName" type="xs:string" />
<xs:assert test="policyHolderFirstName
or not(policyHolderCompanyFlag = 'n')" />
Re: XSD assert [message #1785783 is a reply to message #1785778] Thu, 19 April 2018 18:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31253
Registered: July 2009
Senior Member
That looks like a constraint validated by Xerces. You might ask about it on the WebTools forum:

Or Google "S4s-elt-invalid-content.1" because some of the StackOverflow answers might help you.
Previous Topic:Get cvc-complex-type.3.2.2 error in some, but not all, maven POM files
Next Topic:set annotation to schema object
Goto Forum:

Current Time: Sun Jul 12 14:22:18 GMT 2020

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

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

Back to the top