Changeset 800 for trunk/applications/NXtranslate/xml_parser.cpp
- Timestamp:
- 01/08/06 16:35:04 (6 years ago)
- File:
-
- 1 edited
-
trunk/applications/NXtranslate/xml_parser.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/NXtranslate/xml_parser.cpp
r783 r800 40 40 typedef NodeVector* NodeVectorP; 41 41 typedef Ptr<Retriever> RetrieverPtr; 42 typedef tree<Node> NodeTree; 42 43 43 44 static const int GROUP_STRING_LEN = 128; … … 47 48 static const string SOURCE = "NXS:source"; 48 49 static const string LOCATION = "NXS:location"; 50 static const string COMPRESSION = "NXS:compression"; 49 51 static const string LINK = "NAPIlink"; 50 52 static const string TARGET = "target"; … … 190 192 191 193 // check for "name", "type", "source", "mime_type", "location", 192 // "target" attributes194 // "target", "compression" attributes 193 195 string source; 194 196 string mime_type; 195 197 string location; 198 string compression; 196 199 string type; 197 200 bool update_dims=false; … … 199 202 for( StrVector::iterator it=str_attrs.begin() ; it!=str_attrs.end() ; it+=2){ 200 203 if( (*it==SOURCE) || (*it==MIME_TYPE) || (*it==LOCATION) || (*it==TYPE) 201 || ((*it==TARGET) && (is_link)) || (*it==NAME) ){204 || ((*it==TARGET) && (is_link)) || (*it==NAME) || (*it==COMPRESSION) ){ 202 205 if(*it==SOURCE){ 203 206 source=*(it+1); … … 206 209 }else if(*it==LOCATION){ 207 210 location=*(it+1); 211 }else if(*it==COMPRESSION){ 212 compression=*(it+1); 208 213 }else if(*it==NAME){ 209 214 type=str_name; … … 316 321 } 317 322 323 // set the compression flag 324 if(!compression.empty()){ 325 if(node_from_retriever){ 326 for( NodeTree::iterator it=tree.begin() ; it!=tree.end() ; ++it ){ 327 it->set_comp(compression); 328 } 329 }else{ 330 node.set_comp(compression); 331 } 332 } 333 318 334 // mutate the attributes if necessary 319 335 if(node_attrs.size()>0)
Note: See TracChangeset
for help on using the changeset viewer.
