use of org.kie.dmn.backend.marshalling.CustomStaxReader in project drools by kiegroup.
the class QNameConverter method unmarshal.
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
QName qname = MarshallingUtils.parseQNameString(reader.getValue());
Map<String, String> currentNSCtx = ((CustomStaxReader) reader.underlyingReader()).getNsContext();
String qnameURI = currentNSCtx.get(qname.getPrefix());
if (qnameURI != null) {
return new QName(qnameURI, qname.getLocalPart(), qname.getPrefix());
}
return qname;
}
Aggregations