JafSoft Support Forums  
  Products:
AscToHTM (text to HTML) / AscToPDF (text to PDF) / AscToRTF (text to RTF) / Detagger (HTML to text and markup removal) 

 
  Forum options:
Forum Index  Register  Login  Search  FAQ  Log Out
Member options:
My Profile  Inbox  Member List  Address Book  My Subscription  My Forums 
 
 

Note: Some forums require a login other than "Guest" in order to post messages and replies


How to eliminate particular tags or tagged sections

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums > [Hints and Tips] > [Tutorials and "How To"s] > Detagger Tips > How to eliminate particular tags or tagged sections Page: [1]
Login
Message << Older Topic   Newer Topic >
How to eliminate particular tags or tagged sections - 3/20/2006 9:14:50 PM   
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 >
Post #: 1
Page:   [1]
All Forums > [Hints and Tips] > [Tutorials and "How To"s] > Detagger Tips > How to eliminate particular tags or tagged sections Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts