[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: text replacement with mixed content
On Wed, 2011-08-31 at 17:01 +0200, Geert Bormans wrote: > <test id="7"> > <in original="this old foo is breaking" revision="a new bar > is building" > > <p><b type="stronger">I <i>did not realize that this > </i></b>old foo is breaking <i>this old foo</i></p> > </in> > <out> > <p><b type="stronger">I <i>did not realize that > </i></b><rev>a new bar is building</rev> <i>this old foo</i></p> > </out> > </test> I hadn't seen this test case when I replied before. The regular expression approach can still be used, but it starts to get tricky. I'd probably use the regular expressions in Perl to add empty (milestone) markers, e.g. <start phrase="p3"/> and <end phrase="p3"/>, where p3 is the id of the phrase in a separate XML document... then I'd use XSLT or XQuery to sort out the mess afterwards :-) Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
|
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
|