title: System cannot find DTD referenced by XSL
body: <p>I have a webapplication which uses XSLT transformation (Java 6). The XSL file (basic.xsl) references a DOCTYPE DTD, like so:</p>
  
  <p><strong>Basic.xsl</strong></p>
  
  <p><code>&lt;!DOCTYPE stylesheet SYSTEM "MyXslt.dtd"&gt;</code></p>
  
  <p>When I hit the controller endpoint that uses this logic using an integration test, it runs fine. But when the same endpoint is hit from Fiddler, I get an error:</p>
  
  <blockquote>
    <p>ERROR:  'C:\tools\eclipse\src\com\abc\xslt\MyXslt.dtd (The system cannot find the path specified)'
    FATAL ERROR:  'Could not compile stylesheet'</p>
  </blockquote>
  
  <p>MyXslt.dtd lives in the workspace diectory. So here is the full path - </p>
  
  <blockquote>
    <p>C:\Workspace\src\com\abc\xslt\MyXslt.dtd</p>
  </blockquote>
  
  <p>The rest of the path is getting resolved fine, but the base path is starting from where eclipse lives, not the workspace.</p>
  
  <p>What do I have to do so that the DTD can be found?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>A couple of posters have suggested giving the absolute path. That wouldn't work because the application will be deployed on vaious servers (not my local machine). I cannot, and should not, be giving the absolute path within different servers</p>
  
  <p>There must be a way, maybe some setting in java custom URI resolver that forces the referenced DTD to resolved relative to current location and not relative ot the eclipse root. Any ideas?</p>