Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's a cryptic error, but it's probably because your XSD is malformed. For example, the contents of the channel, hotel (both the inner and outer elements), room, and request <code>xsd:element</code> tags should all be wrapped in <code>xsd:complexType</code> tags. Also, <code>use</code> is only valid on <code>xsd:attribute</code>, not <code>xsd:element</code>. For elements, use minOccurs and maxOccurs (although both default to 1, so they aren't actually necessary in this case). In addition, your outer hotel element contains a room element, which must contain a hotel element, creating an infinite loop. Further, you don't name your username and password elements properly. Finally, that inner hotel element should probably be date. Here's what I think you're looking for:</p> <pre><code>&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;!-- channel --&gt; &lt;xsd:element name="channel"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="username" type="xsd:string"/&gt; &lt;xsd:element name="password" type="xsd:string"/&gt; &lt;/xsd:sequence&gt; &lt;xsd:attribute name="name" use="required" type="xsd:string" /&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;!-- hotel --&gt; &lt;xsd:element name="hotel"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="date"&gt; &lt;xsd:complexType&gt; &lt;xsd:attribute name="from" use="required" type="xsd:string" /&gt; &lt;xsd:attribute name="to" use="required" type="xsd:string" /&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;xsd:element ref="room" minOccurs="1"/&gt; &lt;/xsd:sequence&gt; &lt;xsd:attribute name="id" use="required" type="xsd:string" /&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;!-- room --&gt; &lt;xsd:element name="room"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="allocation" type="xsd:string"&gt;&lt;/xsd:element&gt; &lt;/xsd:sequence&gt; &lt;xsd:attribute name="id" use="required" type="xsd:string" /&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;!-- building all together --&gt; &lt;xsd:element name="request"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element ref="channel" maxOccurs="1"/&gt; &lt;xsd:element ref="hotel" maxOccurs="1"/&gt; &lt;/xsd:sequence&gt; &lt;xsd:attribute name="type" use="required" type="xsd:string" /&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;/xsd:schema&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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