View Full Version : XML file transformarion

06-04-2004, 11:06 AM
Can anybody help with the XML Transformation action?

I have a Universal Installer project that I am running on a Windows XP platform. During installation I have an XML file that I want to transform using XSL.

I have tested the transformation using XMLSPY and it works perfectly.

InstalllShield gives the following (quite unhelpful) message in the log.txt file when it fails:-

ProductException: (error code = 601; message="err"; additional data = [ProductException: (error code = 601; message="err"; additional data = [XSL failure: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found])])
at com.installshield.product.actions.XmlTransformer.productException(Unknown Source)
at com.installshield.product.actions.XmlTransformer.install(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Any help would be greatly appreciated.


If anybody wants the XSL file as an example of transforming elements in an XML file I will happily provide it.

06-04-2004, 02:29 PM
Hi Brian,

It seems that your project is not finding the Xerces XML library.

Most likely, xerces.jar is not in the classpath. There is a helpnet entry (http://helpnet.installshield.com/robo/projects/isxuniversalhelplibrary/topics/modify_classpath.htm) explaining how to place jar files into the classpath.

If you don't have xerces, you can download it from http://xml.apache.org/dist/xerces-j/.

If this is not the case, let me know and I can investigate further.


06-04-2004, 03:42 PM
Thanks for the response Mike. That makes sense.

I downloaded the xerces from the link you provided and placed xercesImpl in my lib directory. I then modified my classpath (using Tools>Options) as follows:-


I still get the same error however. I agree it look's like it is not finding the classes it needs.

Shouldn't InstallShield just do this given that in InstallShield X the XML Transformation is a standard action?


06-04-2004, 04:48 PM
Hi Brian,

After doing more research, it seems that this is a JVM issue. What version of the JVM are you using?

Try running your installer with the latest JVM (1.4.2_04) and see if it still fails.

Another option to try is place the xercesImpl.jar in your JAVA_HOME\lib\ext directory.

If that doesn't fix your problem let me know.


06-04-2004, 05:52 PM
Hi Mike,

Thanks. That did the trick. The transformation now takes place.

My only issue now is that the transformation does not work the same way when running through InstallShield as it does when running through XMLSPY.

I'll figure that one out.

Thanks very much for your help.


11-08-2004, 07:50 PM
I'm also looking to include a XSLT transformation as a part of a product install. My XSL file, though, takes parameters -- is there any way of passing parameters through the XML Transformer?

11-08-2004, 08:09 PM
Alternatively, I'd be happy to do this through Ant script via the xslt task. However, during runtime this produces the error java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison. It looks like ant-trax.jar is not included with InstallShield's ant distribution. Is there any way of ensuring that this is present and in the classpath during runtime?

11-08-2004, 11:02 PM
Figured out how to get the xslt task running. I added the file optional.jar (from the ant-1.5.4 distribution) to the "Embedded JARs" field in Releases->Distributions and again to the "Additional Class Paths" field.

09-07-2005, 02:08 PM

Can you please tell me how you used ant to pass parameters to your xslt? Could you provide a small sample?