[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: text replacement with mixed content
Let me summarize some rules for markup, to show I am not throwing
away all markup (but indeed throw away some of it)
There is a pattern A that needs to be replaced with a replacement B Pattern A is described in a string value that triggers replacement but interfering markup can break the pure string in the actual document. A and B can contain multiple words A can contain markup, B is purely text B will be wrapped in an element to indicate it is a replacement(revision) markup that ends in A but did start before A (with the exception of markup that started right before A) will be forced to close prior to A's replacement eg. <p><b>here is some bolded text that my </b> foo</p> will become given that "my foo" needs to become "your bar" <p><b>here is some bolded text that </b><rev>your bar</rev></p> but <p>here is some bolded text that <b>my </b> foo</p> will become <p>here is some bolded text that <rev>your bar</rev></p> this is all about revisions, and the tricky part is to maintain or not maintain earlier revisions markup that starts and ends in A can be dropped markup that starts in A and ends outside A (with the exception of markup ending right after closing A) must be forced to reopen there is a predictable boundary (p in this example) an A should not cross that boundary markup in A does not break words soft hyphens and non breaking spaces (indicated by '-' in the example) can break "words" hope this helps, pretty confident that the example covers most of this and the result is what I need Ok I've not totally convinced by that expected output, if you are dropping that level of markup (such as the <j>) then you are heading towards just stripping all the markup...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|