Affects Version/s: None
Fix Version/s: None
Component/s: Validating Parser (XML Schema)
The current Java version of Xerces has a significant better error reporting on Identity Constraints, if compared with the C++ version. The primary issue is that the the C++ version is only reporting the name of the element the key identity constraint has been defined, the secondary issue is that the line number reported is of the element closing the tag. A properly failing document will therefore show oceans of duplicated lines in the output, while in fact they are different elements tested, in different parts of the document.
As example the following error is presented:
Error at file /tmp/cxx.xml, line 5009571, char 24
Message: identity constraint key for element 'ServiceFrame' not found
The expected error would be:
Error at file /tmp/cxx.xml, line 1495133, char 51
Key 'ToPointRef' with value 'CXX-ALL:RoutePoint:78210040' not found for identity constraint of element 'ServiceFrame'.
Since the above is quite a difference I started to fiddle with GDB a bit:
So I would state that making this error on par with Java is quite trivial. The only thing I did not find yet how to retrieve the line number for the element that is currently being searched for. Would be nice to get a hand in that direction for crafting a decent patch!