[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: text replacement with mixed content

Subject: Re: text replacement with mixed content
From: Liam R E Quin <liam@xxxxxx>
Date: Wed, 31 Aug 2011 12:32:59 -0400
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.