final String styleFilename,
final NiftyType niftyType,
final Nifty nifty) throws Exception {
log.info("loading new nifty style xml file [" + styleFilename + "] with schemaId [" + schemaId + "]");
XmlParser parser = new XmlParser(new MXParser());
InputStream stream = ResourceLoader.getResourceAsStream(styleFilename);
try {
parser.read(stream);
NiftyStylesType niftyStylesType = (NiftyStylesType) getSchema(schemaId).loadXml(parser);
niftyStylesType.loadStyles(this, niftyType, nifty, log);
} finally {
stream.close();
}