title: The QName value '{http://schemas.xmlsoap.org/soap/encoding/}Array' does not resolve to a(n) simple type definition
body: <p>I'm an XML neophyte having some weird issues with parsing a schema. Here's a minimal example you can run:</p>
  
  <pre><code>#! /usr/bin/env python
  from lxml import etree
  from StringIO import StringIO
  
  XML = StringIO('''&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
  &lt;xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;
      &lt;xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
      &lt;xs:complexType name="ArrayOfDocumentLink"&gt;
          &lt;xs:complexContent&gt;
              &lt;xs:restriction base="soapenc:Array"&gt;
                  &lt;xs:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:DocumentLink[]"/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;''')
  
  etree.XMLSchema(file=XML)
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>lxml.etree.XMLSchemaParseError: complex type 'ArrayOfDocumentLink', attribute 'base': The QName value '{http://schemas.xmlsoap.org/soap/encoding/}Array' does not resolve to a(n) simple type definition., line 7
  </code></pre>
  
  <p>I'm clueless. Various mailing lists and <a href="https://stackoverflow.com/questions/9405921/import-namespace-cannot-resolve-the-name-to-an-type-definition-component">this</a> SO question suggest that there's a workaround that involves collecting all the definitions into an external file. But that doesn't really help a neophyte understand what's going on. Any insight is much appreciated!</p>