protected XStream createXStreamInstance() {
if (namespaces == null || namespaces.size() == 0) {
return new XStream();
}
else {
final QNameMap nsm = new QNameMap();
for (Map.Entry<String,String> me : namespaces.entrySet() ) {
final String namespaceURI = (String)me.getKey();
final String localPart = (String)me.getValue();
nsm.registerMapping(new QName(namespaceURI, localPart), localPart);
}
XStream stream = new XStream(new StaxDriver(nsm));
if ("XPATH_RELATIVE_REFERENCES".equals(mode))
{