title: How to use XLink's href datatype in XSD?
body: <p>I want to define XML which has the ability to link images from within it. I found that it is possible with XLink. But I can't find how to import/include correct XSD.</p>
  
  <p>The following XSD does not validate:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns="http://www.inthemoon.ru/2013/Celebrity"
  
      targetNamespace="http://www.inthemoon.ru/2013/Celebrity"&gt;
  
      &lt;xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.w3.org/1999/xlink.xsd"/&gt;
  
      &lt;xs:element name="celebrities"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name="celebrity" minOccurs="0" maxOccurs="unbounded"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:all&gt;
                              &lt;xs:element name="names"&gt;
                                  &lt;xs:complexType&gt;
                                      &lt;xs:sequence&gt;
                                          &lt;xs:element maxOccurs="unbounded" name="name"
                                              type="xs:string"/&gt;
                                      &lt;/xs:sequence&gt;
                                      &lt;xs:attribute name="lang" type="xs:string"/&gt;
                                  &lt;/xs:complexType&gt;
                              &lt;/xs:element&gt;
                              &lt;xs:element name="images"&gt;
                                  &lt;xs:complexType&gt;
                                      &lt;xs:sequence&gt;
                                          &lt;xs:element name="image"&gt;
                                              &lt;xs:complexType&gt;
                                                  &lt;xs:attribute name="href" type="xlink:href"/&gt;
                                              &lt;/xs:complexType&gt;
                                          &lt;/xs:element&gt;
                                      &lt;/xs:sequence&gt;
                                  &lt;/xs:complexType&gt;
                              &lt;/xs:element&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:schema&gt;
  </code></pre>