Re: [xsl] XML text search & replace

Subject: Re: [xsl] XML text search & replace
From: Liam R E Quin <liam@xxxxxx>
Date: Wed, 23 Mar 2011 15:02:56 +0100
On Wed, 2011-03-23 at 08:50 -0500, a kusa wrote:

> There is a requirement to search for a particular pattern in XML
> documents and replace them by reading another XML file and copying
> over the replacement text correcpinding to the original text.  I have
> been trying to use <xsl:analyze-string> in xslt 2.0. but I am not sure
> how to read another XML file using this tag.

If this is homework, go read the assigned text :-)

If not... yes, you can read the other file with doc(), and if it's
simple text rather than patterns, you can use contains() in a template
that matches text().

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://www.fromoldbooks.org/
Occasional blog: http://www.barefootliam.org/
The barefoot typographer

Current Thread