Toponaming: Add missing TNP element name code; rough in more TNP tests (#14561)

* Add missing TNP element name code; rough in more TNP tests

* Update ElementNamingUtils.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
bgbsww
2024-07-08 19:43:42 -04:00
committed by GitHub
parent 5658491b51
commit dc9849bdb7
4 changed files with 379 additions and 0 deletions

View File

@@ -56,6 +56,11 @@ std::string Data::noElementName(const char *name) {
}
const char *Data::findElementName(const char *subname) {
#ifdef FC_USE_TNP_FIX
// skip leading dots
while(subname && subname[0] == '.')
++subname;
#endif
if(!subname || !subname[0] || isMappedElement(subname))
return subname;
const char *dot = strrchr(subname,'.');