Link to home
Create AccountLog in
Avatar of jdharsha

asked on

including XSL file(s) from multiple paths


Aim: Include one XSL file into another.

Background: I have configured the relative path to the directory where the common xsl's exist, please find below.

      ByteArrayInputStream bs = new ByteArrayInputStream(template);
      URL commonTemplatesUrl = PdfReportBuilder.class.getResource("/fop/xsl/");
      Source xsltSrc = new StreamSource(bs, commonTemplatesUrl.toExternalForm());

The relative path("/fop/xsl/") exist in a jar file (the jar is included in the classpath of the project).

Problem: I had a requirement to include another XSL file at project level. Because the included templates are only getting picked at the relative path ("/fop/xsl/") I created a folder structure("/fop/xsl/") at the project level. And now the common XSL's i.e from jar file are not getting picked.

Question: Is there a way to configure multiple paths??

please let me know if you need more info.

Avatar of Am P
Am P
Flag of India image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account