Changeset 18895 for gsdl/trunk/runtime-src/src/oaiservr/metaformat.cpp
- Timestamp:
- 2009-04-06T13:18:45+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/oaiservr/metaformat.cpp
r18884 r18895 69 69 if (metaItem == this->formatPrefix()) { 70 70 metaItem = substr(last+1, here->first.end()); // Get the rest of the metadata tag (it's name) but without the '.' 71 lc(metaItem); // Convert it to lowercase for putting in the xml tags 72 71 lc(metaItem.begin(),metaItem.begin()+1); // We want lowercase, but some of the fields in qualified dublin core have internal upper case, eg instructionalMethod. So we assume that lowercasing the first letter is enough 73 72 if (doOutput) { 74 this->output_item(output, utf8convert, headerDone, metaItem, here->second.values); 73 if (this->is_valid_element(metaItem)) { 74 75 this->output_item(output, utf8convert, headerDone, metaItem, here->second.values); 76 } 75 77 } 76 78 else { … … 86 88 // particular metadata is stuff we don't want? 87 89 if (doOutput) { 88 this->output_item(output, utf8convert, headerDone, mapTo, here->second.values); 90 if (this->is_valid_element(mapTo)) { 91 this->output_item(output, utf8convert, headerDone, mapTo, here->second.values); 92 } 89 93 } 90 94 else { … … 115 119 ofstream o("dummy", ios::out); 116 120 return this->scan_metadata(o, collection, docInfo, false); 121 } 122 123 bool metaformat::is_valid_element(text_t &meta_name) 124 { 125 if (elementSet.count(meta_name)==1) return true; 126 return false; 127 117 128 } 118 129
Note:
See TracChangeset
for help on using the changeset viewer.