Show duplicate attribute

Change-Id: I6e1e66012817178c167e7cb531811686cb2fec19
This commit is contained in:
Julien Nabet
2015-04-11 15:54:29 +02:00
parent 618f88466b
commit f3abca2b45

View File

@@ -293,6 +293,7 @@ namespace sax_fastparser {
#ifdef DBG_UTIL #ifdef DBG_UTIL
// Well-formedness constraint: Unique Att Spec // Well-formedness constraint: Unique Att Spec
OString const nameId(getId(nToken)); OString const nameId(getId(nToken));
SAL_WARN_IF(DebugAttributes.find(nameId) != DebugAttributes.end(), "sax", "Duplicate attribute: " << nameId );
assert(DebugAttributes.find(nameId) == DebugAttributes.end()); assert(DebugAttributes.find(nameId) == DebugAttributes.end());
DebugAttributes.insert(nameId); DebugAttributes.insert(nameId);
#endif #endif