title: How to generate XSD using XSLT manually
body: <p>I am struggling with this question.  Could I, using XSLT, generate an XSD based on an XML file input ?
  I know there are many software that I can use to do that automatically, but I need it by writing code.</p>
  
  <p>Could you help me with how to start in this and support me with useful resources?</p>
  
  <p>This is a sample XML file: I need to generate XSD  using XSLT and validate it:</p>
  
  <pre><code>&lt;test&gt;
    &lt;a&gt;
      &lt;b&gt; &lt;/b&gt;
    &lt;/a&gt;
    &lt;d&gt; &lt;/d&gt;
  &lt;/test&gt;
  </code></pre>