Note that there are some explanatory texts on larger screens.

plurals
  1. POs4s-elt-must-match.1: error in xml schema
    primarykey
    data
    text
    <p>I'm getting the following error while trying to validate a xml schema-</p> <pre><code>16: 24 s4s-elt-must-match.1: The content of 'member' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: complextype. 31: 21 s4s-elt-must-match.1: The content of 'intake' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: complextype. </code></pre> <p>Below is the schema-</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"&gt; &lt;xs:element name="record"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="id" minOccurs="1" maxOccurs="1"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="hof" type="xs:string" minOccurs="1" maxOccurs="1"/&gt; &lt;xs:element name="member" minOccurs="1" maxOccurs="unbounded"&gt; &lt;xs:complextype&gt; &lt;xs:all&gt; &lt;xs:element name="name" type="xs:string"/&gt; &lt;xs:element name="age" type="xs:nonNegativeInteger"/&gt; &lt;xs:element name="sex" type="xs:string"/&gt; &lt;xs:element name="occupation" type="xs:string" minOccurs="0"/&gt; &lt;xs:element name="pregnant" type="xs:boolean" minOccurs="0"/&gt; &lt;xs:element name="lactating" type="xs:boolean" minOccurs="0"/&gt; &lt;/xs:all&gt; &lt;/xs:complextype&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="intake" minOccurs="1" maxOccurs="1"&gt; &lt;xs:complextype&gt; &lt;xs:sequence&gt; &lt;xs:element name="food" minOccurs="0" maxOccurs="unbounded"&gt; &lt;xs:complextype&gt; &lt;xs:sequence&gt; &lt;xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/&gt; &lt;xs:element name="amount" type="xs:decimal" minInclusive="0" minOccurs="1" maxOccurs="1"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complextype&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complextype&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:schema&gt; </code></pre> <p>And this is the corresponding XML file-</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;record xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com record.xsd"&gt; &lt;id&gt; &lt;hof&gt;ABC&lt;/hof&gt; &lt;member&gt; &lt;name&gt;ABC&lt;/name&gt; &lt;age&gt;35&lt;/age&gt; &lt;sex&gt;Male&lt;/sex&gt; &lt;occupation&gt;Manual Laboror&lt;/occupation&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;DEF&lt;/name&gt; &lt;age&gt;30&lt;/age&gt; &lt;sex&gt;Female&lt;/sex&gt; &lt;occupation&gt;House Wife&lt;/occupation&gt; &lt;pregnant&gt;no&lt;/pregnant&gt; &lt;lactating&gt;no&lt;/lactating&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;ghi&lt;/name&gt; &lt;age&gt;2&lt;/age&gt; &lt;sex&gt;Female&lt;/sex&gt; &lt;/member&gt; &lt;/id&gt; &lt;intake&gt; &lt;food&gt; &lt;name&gt;rice&lt;/name&gt; &lt;amount&gt;800&lt;/amount&gt; &lt;/food&gt; &lt;food&gt; &lt;name&gt;dal&lt;/name&gt; &lt;amount&gt;200&lt;/amount&gt; &lt;/food&gt; &lt;/intake&gt; &lt;/record&gt; </code></pre> <p>I've already tried the solution provided <a href="https://stackoverflow.com/questions/13670153/xml-validation-issue-error-s4s-elt-must-match">here</a> but could'nt get it to work.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload