Jaf
Posts: 70
Joined: 2/1/2006 Status: offline
|
Although Detagger has many options for removing particular classes of tags, sometimes people say they want to use Detagger to selectively remove a particular tag from the HTML, or they'd like a specially tagged section of text omitted/extracted in a conversion to text. In such cases you can use the "Text Commands" feature. This feature allows you to define text manipulation commands which are executed against the input text line-by-line before it is passed to the converter this can make your text look quite different to Detagger. For example, recently a customer contact me with markup in the form {0> "English Text" <}100{> "French Text" <0} where there was a translation going on and the 100 represented the accuracy of the translation. As it stands Detagger will remove anything between a < and > when you convert to text. However using the Text commands
replace_text exact_string "{0>" by_string "<!-- "
replace_text exact_string "<}" by_string ""
replace_text exact_string "{>" by_string " -->"
replace_text exact_string "<0}" by_string ""
would turn the above line into <!-- English Text 100 --> French Text before it was detagged, so after detagging it would show just the French text "French Text" Alternatively the commands
replace_text exact_string "{0>" by_string " "
replace_text exact_string "<}" by_string "<!-- "
replace_text exact_string "{>" by_string " "
replace_text exact_string "<0}" by_string " -->"
turns the line into English Text <!-- 100 French Text --> which would detag to show "English text" This can be a powerful technique for selectively detagging files or concerting them to text.
< Message edited by Jaf -- 3/20/2006 10:15:17 PM >
|