diff --git a/src/properties.cpp b/src/properties.cpp index ff37296d..1f4839fc 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -1186,7 +1186,7 @@ namespace Exiv2 { { std::string prefix = key.groupName(); std::string property = key.tagName(); - // If the key is that of a nested property, determine the type of the innermost element + // If property is a path for a nested property, determines the innermost element std::string::size_type i = property.find_last_of('/'); if (i != std::string::npos) { for (; i != std::string::npos && !isalpha(property[i]); ++i) {} @@ -1195,13 +1195,11 @@ namespace Exiv2 { if (i != std::string::npos) { prefix = property.substr(0, i); property = property.substr(i+1); - /* - std::cout << "Nested key: " << key.key() - << ", prefix: " << prefix - << ", property: " << property - << "\n"; - */ } +#ifdef DEBUG + std::cout << "Nested key: " << key.key() << ", prefix: " << prefix + << ", property: " << property << "\n"; +#endif } const XmpPropertyInfo* pl = propertyList(prefix); if (!pl) return 0; diff --git a/src/properties.hpp b/src/properties.hpp index d6d0fad3..0b04859b 100644 --- a/src/properties.hpp +++ b/src/properties.hpp @@ -131,6 +131,11 @@ namespace Exiv2 { static TypeId propertyType(const XmpKey& key); /*! @brief Return information for the property for key. + + If the key is a path to a nested property (one which contains a slash, + like \c Xmp.MP.RegionInfo/MPRI:Regions), determines the innermost element + (\c Xmp.MPRI.Regions) and returns its property information. + @param key The property key @return A pointer to the property information, 0 if the key is of an unknown property.