Ignore:
Timestamp:
2011-07-22T20:24:23+12:00 (13 years ago)
Author:
ak19
Message:

More changes to do with the ex. prefixed to embedded metadata (that may have an additional metadata set as namespace qualifier). The C code now removes the ex. prefix only if there are no other metadataset qualifiers in the metadata name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/querytools.cpp

    r24111 r24306  
    989989    if (!tag.empty()) {
    990990
    991       if (tag.size()>3 && (substr(tag.begin(), tag.begin()+3) == "ex.")) {
     991      // remove "ex." prefix, but only if there are no other metadata set qualifiers
     992      // in the metaname, since we want to retain prefixes like "ex.dc." as-is
     993      text_t::iterator period = findchar(tag.begin(), tag.end(), '.');
     994      text_t::iterator lastperiod = findlastchar(tag.begin(), tag.end(), '.');
     995
     996      if (tag.size()>3 && (substr(tag.begin(), tag.begin()+3) == "ex.") && period == lastperiod) {
    992997    tag = substr (tag.begin()+3, tag.end());
    993998      }
Note: See TracChangeset for help on using the changeset viewer.