Hello Scot, thanks for a quick response!
> first you are killing yourself in the way you XSLT is > written > [. . .] > You are trying to do the work of the templating engine in your XSLT :) Yes, I know this is a "procedural" way of doing things and maybe not the best. But the example is just an example. The real script is much bigger and more complicated. I just tried to give a simple case to reproduce the problem. Do you also think that it should work (despite the fact that it's may be not the best way to do it)? The java program I used to verify the transformation is: package my.test; import java.io.File; import java.io.StringWriter; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; public class Transform { public static void main(String[] args) throws Exception { String inputFileName = "Q:\\MiscThings\\t\\a.xml"; String xslFileName = "Q:\\MiscThings\\t\\trans.xsl"; Source xmlSource = new StreamSource(new File(inputFileName)); Source xslSource = new StreamSource(new File(xslFileName)); StringWriter stringWriter = new StringWriter(); Result transformationResult = new StreamResult(stringWriter); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(xslSource); transformer.transform(xmlSource, transformationResult); stringWriter.flush(); String xmlResult = stringWriter.toString(); System.out.println(xmlResult); } } --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org