title: Camel URIResolver resolving relative path on outside http server
body: <p>I'm having trouble with Camel xslt transformation. I want to have server http which contains xsl files. Those files are included using direct path created in my program like:
  <b>xml:include href="http://serverName.com/files/file.xsl"/</b>
  But then on the server, files should include another files but using relative paths. So it looks like 
  <b>xml:include href="../directory/file.xsl"/</b></p>
  
  <p>I wrote my own URIResolver which ovverides method resolve
      @Override
      public Source resolve(String href, String base) throws TransformerException {
          base = testBase;
          if (href == null || href.equals(""))
              throw new TransformerException();</p>
  
  <pre><code>    if (base == null || base.equals(""))
          return resolve(href);
  
      String uri = createUri(href, base);
  
      return resolve(uri);
  }
  </code></pre>
  
  <p>but base parameter is always null. I read that this parameter is somehow connected to systemID but I don't know what to do with it. I only create the first main xsl file and then everything else is processed by Camel Transformer. What is more this transformer is singletone in my application so I can't load different URIResolver each time I start transformation. Therfore only option seems to be storing information about server address inside xsl file (preferably main file which has direct paths to server). I tried to do this with  but all I got is URIResolver getting something like @baseDir/directory/file.xml in href parameter and base is still null. </p>
  
  <p>So does anyone have an idea how to do this? Preferably with Camel but if it proves itself to be impossible maybe you have suggestions about another framework?</p>
  
  <p>Thanks for all responses in advance
  Lukasz</p>