throw new IllegalArgumentException("HTMLwithXSLBuilder2::transform : Illegal argument for HTML output");
}
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(tXslSource);
// Set the Stylesheet params (if any)
if (aParamList != null) {
String tKey;
Object tValue;
for (Enumeration tKeys = aParamList.keys() ; tKeys.hasMoreElements() ;) {
tKey = (String) tKeys.nextElement();
tValue = aParamList.get(tKey);
if (tValue == null) {
// Should never happen
throw new ProgrammerException
("HTMLwithXSLBuilder2: internal error, problem with Hashtable aParamList");
}
transformer.setParameter(tKey, /* parameter name */
tValue /* parameter value */ );
}
}
// Use the transformer to apply the Stylesheet to an XML document
// and write the output to the specified Result object.
transformer.transform(tXmlSource, tOutputTarget);
} catch(TransformerFactoryConfigurationError ex) {
throw new ProgrammerException
("HTMLwithXSLBuilder2: transform returns TransformerFactoryConfigurationError: " + ex.getMessage());
} catch(TransformerConfigurationException ex) {