node = temp; // the original element will do the job
} else {
try {
node = (StyleElement)actualClass.newInstance();
} catch (InstantiationException err1) {
throw new TransformerFactoryConfigurationError(err1, "Failed to create instance of " + actualClass.getName());
} catch (IllegalAccessException err2) {
throw new TransformerFactoryConfigurationError(err2, "Failed to access class " + actualClass.getName());
}
node.substituteFor(temp); // replace temporary node with the new one
}
return node;
}