Note that there are some explanatory texts on larger screens.

plurals
  1. POcvc-elt.1.a: Cannot find the declaration of element 'Order'
    primarykey
    data
    text
    <p>I know what the error means, but as far as I can see, the Order element is properly declared in the schema. Is it something to do with the way I declare my schema location? I am not sure how to go about fixing the declaration. Any thoughts?</p> <p>My XML</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;Order xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lolteamrecruiter.com order.xsd"&gt; &lt;Customer id="n12"&gt;Aaron Rodgers&lt;/Customer&gt; &lt;Product&gt; &lt;Name&gt;Old Time Souvenir Football&lt;/Name&gt; &lt;SKU&gt;244&lt;/SKU&gt; &lt;Quantity&gt;12&lt;/Quantity&gt; &lt;Price currency="taco"&gt;21.95&lt;/Price&gt; &lt;ShipTo&gt; &lt;Street&gt;135 Airline Highway&lt;/Street&gt; &lt;City&gt;Green Bay&lt;/City&gt; &lt;State&gt;WI&lt;/State&gt; &lt;Zip&gt;02882&lt;/Zip&gt; &lt;/ShipTo&gt; &lt;/Product&gt; &lt;Product&gt; &lt;Name&gt;Official Packer Football&lt;/Name&gt; &lt;SKU&gt;256&lt;/SKU&gt; &lt;Quantity&gt;1&lt;/Quantity&gt; &lt;Price currency="USD"&gt;France&lt;/Price&gt; &lt;Discount&gt;.10&lt;/Discount&gt; &lt;ShipTo&gt; &lt;GiftRecipient&gt;Gertrude Rodgers&lt;/GiftRecipient&gt; &lt;Street&gt;271 Old Homestead Way&lt;/Street&gt; &lt;City&gt;San Francisco&lt;/City&gt; &lt;State&gt;CA&lt;/State&gt; &lt;Zip&gt;02895&lt;/Zip&gt; &lt;/ShipTo&gt; &lt;GiftMessage&gt;Happy Mothers Day to a great Mom! Love, Aaron&lt;/GiftMessage&gt; &lt;/Product&gt; &lt;Subtotal currency='USD'&gt;263.40&lt;/Subtotal&gt; &lt;Tax rate="7.0" currency='USD'&gt;18.44&lt;/Tax&gt; &lt;Shipping method="USPS" currency='USD'&gt;8.95&lt;/Shipping&gt; &lt;Total currency='USD' &gt;290.79&lt;/Total&gt; &lt;/Order&gt; </code></pre> <p>My XSD</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt; &lt;xs:element name="Order"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="Customer" type="xs:string"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="id" type="xs:string" use="required"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Product" minOccurs="1" maxOccurs="unbounded"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="Name" type="xs:string"/&gt; &lt;xs:element name="SKU" type="xs:string"/&gt; &lt;xs:element name="Quantity" type="xs:string"/&gt; &lt;xs:element name="Price" type="currRestrict"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="currency" type="currencyType" use="required"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Discount" type="xs:string" minOccurs="0" maxOccurs="1"/&gt; &lt;xs:element name="ShipTo"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="GiftRecipient" type="xs:string"/&gt; &lt;xs:element name="street" type="xs:string"/&gt; &lt;xs:element name="City" type="xs:string"/&gt; &lt;xs:element name="State" type="xs:decimal"/&gt; &lt;xs:element name="Zip" type="xs:decimal"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="GiftMessage" type="xs:string" minOccurs="0" maxOccurs="1"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Subtotal" type="xs:decimal"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="currency" type="currencyType" use="required"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Tax" type="xs:decimal"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="currency" type="currencyType" use="required"/&gt; &lt;xs:attribute name="rate" type="currencyType"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Shipping" type="xs:string"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="currency" type="currencyType" use="required"/&gt; &lt;xs:attribute name="method" type="methodType" default="UPS"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Total" type="xs:decimal"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="currency" type="currencyType" use="required"/&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:simpleType name="currencyType"&gt; &lt;xs:restriction base="xs:string"&gt; &lt;xs:enumeration value="USD"/&gt; &lt;xs:enumeration value="CAN"/&gt; &lt;xs:enumeration value="GBP"/&gt; &lt;/xs:restriction&gt; &lt;/xs:simpleType&gt; &lt;xs:simpleType name="methodType"&gt; &lt;xs:restriction base="xs:string"&gt; &lt;xs:enumeration value="UPS"/&gt; &lt;xs:enumeration value="USPS"/&gt; &lt;xs:enumeration value="Overnight"/&gt; &lt;/xs:restriction&gt; &lt;/xs:simpleType&gt; &lt;xs:simpleType name="currRestrict"&gt; &lt;xs:restriction base="xs:decimal"&gt; &lt;/xs:restriction&gt; &lt;/xs:simpleType&gt; &lt;/xs:schema&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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. 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