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:complexType>
<xs:sequence>
<xs:element name="policyHolderCompanyFlag" type="booleanType" />
<xs:element name="policyHolderFirstName" type="xs:string" />
</xs:sequence>
<xs:assert test="policyHolderFirstName
or not(policyHolderCompanyFlag = 'n')" />
</xs:complexType>
</xs:element>
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: 29545
Registered: July 2009
Senior Member
That looks like a constraint validated by Xerces. You might ask about it on the WebTools forum:

https://www.eclipse.org/forums/index.php/f/251/

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: Sat Sep 22 19:29:37 GMT 2018

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

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

Back to the top