Note that there are some explanatory texts on larger screens.

plurals
  1. POXML Schema - Key in sequence
    primarykey
    data
    text
    <p>I'm trying to put a key in sequence and am being bombarded with errors. It seems I can't do this. Additionally, I am being told my key needs a field and selector, which I have been able to find very little documentation on. (In fact, in desperation, I downloaded Liquid XML Studio [vs. Notepad] and searched it's help files. . . to find NO even reference to the word "selector") Regardless - what is another method I can use to guarantee a unique, not null value for an element, within a sequence? (The content in question is a string)</p> <p>Please note that without the key element, the schema validates.</p> <h3>The error</h3> <blockquote> Invalid per cvc-complex-type.1.2.4: element {http://www.w3.org/2001/XMLSchema}:key not allowed here (1) in element {http://www.w3.org/2001/XMLSchema}:sequence, expecting [{http://www.w3.org/2001/XMLSchema}:annotation, $, {http://www.w3.org/2001/XMLSchema}:element, {http://www.w3.org/2001/XMLSchema}:group, {http://www.w3.org/2001/XMLSchema}:choice, {http://www.w3.org/2001/XMLSchema}:sequence, {http://www.w3.org/2001/XMLSchema}:any]: </blockquote> <h3>The schema</h3> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="READOO" elementFormDefault="qualified"&gt; &lt;xs:element name="ReferralCollection"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:key name="URL" type="string" /&gt; &lt;xs:element maxOccurs="unbounded" name="keyword"&gt; &lt;xs:complexType&gt; &lt;xs:simpleContent&gt; &lt;xs:extension base="xs:string"&gt; &lt;xs:attribute name="occurrences" type="xs:int" use="required" /&gt; &lt;/xs:extension&gt; &lt;/xs:simpleContent&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>
    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.
 

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