title: Error: White spaces are required between publicId and systemId
body: <p>I think I made mistakes in XML file in DOCTYPE line. How can I solve my problem?</p>
  <p>I using DOM library for parsing XML file. My XML file is named <code>firstTime.xml</code>:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
      &lt;!DOCTYPE tests PUBLIC &quot;firstTime.xsd&quot;&gt;
      &lt;tests xmlns=&quot;http://www.example.com/Report&quot;
             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
             xsi:schemaLocation=&quot;http://www.example.com/Report firstTime.xsd&quot;&gt;
          &lt;test id=&quot;1&quot;&gt;
              &lt;coverage&gt;65&lt;/coverage&gt;
              &lt;usedFramework&gt;Junit4&lt;/usedFramework&gt;
              &lt;typeTest&gt;Integration&lt;/typeTest&gt;
          &lt;/test&gt;
          &lt;test id=&quot;2&quot;&gt;
              &lt;coverage&gt;35&lt;/coverage&gt;
              &lt;usedFramework&gt;Junit5&lt;/usedFramework&gt;
              &lt;typeTest&gt;Module&lt;/typeTest&gt;
          &lt;/test&gt;
          &lt;test id=&quot;3&quot;&gt;
              &lt;coverage&gt;45&lt;/coverage&gt;
              &lt;usedFramework&gt;Mockito&lt;/usedFramework&gt;
              &lt;typeTest&gt;Integration&lt;/typeTest&gt;
          &lt;/test&gt;
      &lt;/tests&gt;
  </code></pre>
  <p>My XSD file is named <code>firstTime.xsd</code>:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;xs:schema targetNamespace=&quot;http://www.example.com/Report&quot;
             xmlns=&quot;http://www.example.com/Report&quot;
             xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
             elementFormDefault=&quot;qualified&quot;&gt;
  
      &lt;xs:element name=&quot;tests&quot;&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name=&quot;test&quot; maxOccurs=&quot;unbounded&quot;&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:sequence&gt;
                              &lt;xs:element name=&quot;coverage&quot; type=&quot;xs:positiveInteger&quot;/&gt;
                              &lt;xs:element name=&quot;usedFramework&quot; type=&quot;xs:string&quot;/&gt;
                              &lt;xs:element name=&quot;typeTest&quot; type=&quot;xs:string&quot;/&gt;
                          &lt;/xs:sequence&gt;
                          &lt;xs:attribute name=&quot;id&quot; type=&quot;xs:positiveInteger&quot;/&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>My code using Java:</p>
  <pre><code>try {
              File inputXml = new File(xmlPath);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, &quot;&quot;);
              factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, &quot;&quot;);
              factory.setValidating(true);
              DocumentBuilder builder = factory.newDocumentBuilder();
              Document document = builder.parse(inputXml);
          
  
          }catch (ParserConfigurationException | IOException | SAXException e){
              Logger.getLogger(XmlReader.class.getName()).log(Level.INFO,e.getMessage());
          }
  </code></pre>
  <p>Error occurs when I'm trying to run java app:</p>
  <p><a href="https://i.stack.imgur.com/k3KR6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k3KR6.png" alt="enter image description here" /></a></p>
  <p>after i changed xml file by adding this lines</p>
  <pre><code>&lt;!DOCTYPE tests SYSTEM &quot;firstTime.xsd&quot;&gt;
  &lt;!DOCTYPE tests PUBLIC &quot;1&quot; &quot;firstTime.xsd&quot;&gt;
  </code></pre>
  <p>i recieve this error</p>
  <p><a href="https://i.stack.imgur.com/XbuYX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XbuYX.png" alt="enter image description here" /></a></p>