class-static */
| 1088 | // --------------- |
| 1089 | |
| 1090 | /* class-static */ bool |
| 1091 | XMPMeta::GetNamespaceURI ( XMP_StringPtr namespacePrefix, |
| 1092 | XMP_StringPtr * namespaceURI, |
| 1093 | XMP_StringLen * uriSize ) |
| 1094 | { |
| 1095 | bool found = false; |
| 1096 | |
| 1097 | XMP_Assert ( *namespacePrefix != 0 ); // ! Enforced by wrapper. |
| 1098 | XMP_Assert ( (namespacePrefix != 0) && (namespaceURI != 0) ); // ! Enforced by wrapper. |
| 1099 | |
| 1100 | XMP_VarString nsPrefix ( namespacePrefix ); |
| 1101 | if ( nsPrefix[nsPrefix.size()-1] != ':' ) nsPrefix += ':'; |
| 1102 | |
| 1103 | XMP_StringMapPos prefixPos = sNamespacePrefixToURIMap->find ( nsPrefix ); |
| 1104 | |
| 1105 | if ( prefixPos != sNamespacePrefixToURIMap->end() ) { |
| 1106 | *namespaceURI = prefixPos->second.c_str(); |
| 1107 | *uriSize = prefixPos->second.size(); |
| 1108 | found = true; |
| 1109 | } |
| 1110 | |
| 1111 | return found; |
| 1112 | |
| 1113 | } // GetNamespaceURI |
| 1114 | |
| 1115 | |
| 1116 | // ------------------------------------------------------------------------------------------------- |