title: Null pointer Exception when processing XSD using xsom
body: <p>i have an XSD like this</p>
  
  <pre><code>&lt;xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="www.aaa.com/aa" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xs:include schemaLocation="class.xsd"/&gt;
      &lt;xs:element name="record"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name="Stud" minOccurs="0"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:sequence&gt;
                              &lt;xs:element name="fname" type="xs:string"/&gt;
                              &lt;xs:element name="lname" type="xs:string"/&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>
  
  <p>When i parse this XSD using XSOM it gives <code>Null Pointer Exception</code>. When i remove the <code>&lt;xs:include schemaLocation="class.xsd"/&gt;</code> element it works fine</p>
  
  <pre><code> XSOMParser parser = new XSOMParser();
         parser.parse(inputStream);// -&gt; this statement gives null pointer.
  </code></pre>
  
  <p><strong>Stack trace</strong></p>
  
  <pre><code>Exception in thread "main" java.lang.NullPointerException
      at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:327)
      at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.includeSchema(NGCCRuntimeEx.java:234)
      at com.sun.xml.xsom.impl.parser.state.includeDecl.action0(includeDecl.java:42)
      at com.sun.xml.xsom.impl.parser.state.includeDecl.leaveElement(includeDecl.java:109)
      at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime.java:275)
      at org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
      at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115)
      at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337)
      at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:124)
      at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:183)
      at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:138)
  </code></pre>
  
  <p>thanks in advance</p>