Avatar of jdharsha
jdharsha
 asked on

including XSL file(s) from multiple paths

Hello,

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.

Thanks,
Web Languages and StandardsXMLJava

Avatar of undefined
Last Comment
Am P

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Am P

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck