- pair< boost::shared_ptr<AttributeDecoder>,vector<string> >& decl = m_attrMap[pair<xstring,xstring>(name,format)];
+ // Trim the format, or the name only if the format is the default (URI).
+ pair<xstring,xstring> entryKey;
+ if (*format == chNull) {
+ auto_ptr_XMLCh copyName(name);
+ entryKey.first = copyName.get();
+ } else {
+ entryKey.first = name;
+ auto_ptr_XMLCh copyFormat(format);
+ entryKey.second = copyFormat.get();
+ }
+ pair< boost::shared_ptr<AttributeDecoder>,vector<string> >& decl = m_attrMap[entryKey];