if (namedStyle.getSldLocation() != null) {
Resource resource = applicationContext.getResource(namedStyle.getSldLocation());
IBindingFactory bindingFactory;
try {
bindingFactory = BindingDirectory.getFactory(StyledLayerDescriptorInfo.class);
IUnmarshallingContext unmarshallingContext = bindingFactory.createUnmarshallingContext();
StyledLayerDescriptorInfo sld = (StyledLayerDescriptorInfo) unmarshallingContext
.unmarshalDocument(new InputStreamReader(resource.getInputStream()));
namedStyle.setStyledLayerInfo(sld);
} catch (JiBXException e) {
throw new LayerException(e, ExceptionCode.INVALID_SLD, namedStyle.getSldLocation(),