Mercurial > hg > extraction-interface
comparison models/extractapp.php @ 76:c49192885290 extractapp
Bug fixed: ambiguous tag occured at Editing-text mode
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 13 Apr 2015 15:43:59 +0200 |
parents | 75233b09c580 |
children | 97c1e5102a22 |
comparison
equal
deleted
inserted
replaced
75:75233b09c580 | 76:c49192885290 |
---|---|
376 $require = preg_replace('/&/u', "&", $require); | 376 $require = preg_replace('/&/u', "&", $require); |
377 $require = preg_replace("/○/u", " ", $require); | 377 $require = preg_replace("/○/u", " ", $require); |
378 $require = preg_replace("/<br>/u", "\n", $require); | 378 $require = preg_replace("/<br>/u", "\n", $require); |
379 //$require = preg_replace("/<br>/u", "\n", $require); | 379 //$require = preg_replace("/<br>/u", "\n", $require); |
380 | 380 |
381 | 381 $require = "<text_content>".$require."</text_content>\n"; |
382 | |
383 /* | |
382 if ($_postdata['branchId'] == 0) { | 384 if ($_postdata['branchId'] == 0) { |
383 // -- new branch case | 385 // -- new branch case |
384 $require = "<text_content>".$require."</text_content>\n"; | 386 $require = "<text_content>".$require."</text_content>\n"; |
385 } | 387 } |
388 */ | |
389 | |
386 $require = $this->AppendMetaData($require); | 390 $require = $this->AppendMetaData($require); |
387 | 391 |
388 //saving in my local machine in developing phrase | 392 //saving in my local machine in developing phrase |
389 if ($AT_LOCAL) { | 393 if ($AT_LOCAL) { |
390 file_put_contents("data/parsing_files/".$_postdata['sectionId'].".txt", $require); | 394 file_put_contents("data/parsing_files/".$_postdata['sectionId'].".txt", $require); |
1161 */ | 1165 */ |
1162 // ----- | 1166 // ----- |
1163 | 1167 |
1164 $contentString = (string)($xml->text_content->asXML()); | 1168 $contentString = (string)($xml->text_content->asXML()); |
1165 | 1169 |
1166 return $contentString; | 1170 $removed_str = array("<text_content>","</text_content>"); |
1171 $new_contentString = str_replace($removed_str, "", $contentString); | |
1172 | |
1173 return $new_contentString; | |
1167 } | 1174 } |
1168 | 1175 |
1169 | 1176 |
1170 private function GetSectionContent() { // called only by GetTextFromLocal() | 1177 private function GetSectionContent() { // called only by GetTextFromLocal() |
1171 $section_id = $this->GetSectionId(); | 1178 $section_id = $this->GetSectionId(); |