Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » XSD assert(error on assert)
XSD assert [message #1785778] Thu, 19 April 2018 11:22 Go to next message
Eclipse UserFriend
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 14:45 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 09:51:49 EDT 2025

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

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

Back to the top