Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would suggest a simple renaming of the schema items, plus the usage of grouping (shown below) or xsd includes (if you need this complex type for other schemas). This should solve to problem if you have no hard requirment on the names.</p> <p>From experience, I don't think may tools will work with the repeated naming in your example.</p> <p>Something like this may do the trick:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xs:schema id="XSDobject" targetNamespace="http://tempuri.org/XSDobject.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XSDobject.xsd" xmlns:mstns="http://tempuri.org/XSDobject.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xs:group name="Contact"&gt; &lt;xs:sequence&gt; &lt;xs:element name="name" type="xs:string" /&gt; &lt;xs:element name="phone" type="xs:string" /&gt; &lt;/xs:sequence&gt; &lt;/xs:group&gt; &lt;xs:element name="order"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="OrderContact"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:group ref="Contact"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="buyer"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="BuyerContact"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:group ref="Contact"/&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>
    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.
    1. VO
      singulars
      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