Hi,
I have the following problem
I have a xsl file (template.xsl) where I need to
add some import directives dynamically, I´m trying the code:
Source xslSource = new StreamSource(new
FileReader(new File("template.xsl")));
StylesheetRoot template = (StylesheetRoot)tFactory.newTemplates(xslSource); StylesheetRoot templateToImport = (StylesheetRoot)tFactory.newTemplates(new StreamSource(new FileReader(new File("templateToImport.xsl")))); template.setImport(templateToImport); template.recompose(); Transformer transformer = template.newTransformer(); transformer.transform(xmlSource,new StreamResult(new File("out.out"))); but the transformations in
templateToImport are not applied (if I include <xsl:import
href="templateToImport.xsl" /> in template.xsl directly all works
fine.
I need add the import modifying templates object or
something like this without change de file template.xsl nor reading it to a
String, adding the import to this String and create the templates from the
String
Can anybody help me?
Luis Villar Esmorís [ [EMAIL PROTECTED] ] I+D NewMedia Publishing [ http://www.nmp.es ] Tel. +34 915 913 948 ----------------------- |