Altova Mailing List Archives

Re: [xsl] Using XSLT to do a search & replace

From: Brandon Ibach <brandon.ibach@---------------.--->
To: xsl-list <xsl-list@-----.------------.--->
Date: 4/21/2011 6:18:00 PM
This sounds like something that would be easy to do with an XSLT
identity transform with a template for each pattern that needs to be
replaced with something else.

However, I don't quite understand the meaning of your examples.  What
do the square brackets mean?  Can you provide a short sample of input
and the corresponding output?

-Brandon :)

On Thu, Apr 21, 2011 at 2:09 PM, Bubba O'Reily <killswi7ch1@l...> wrote:
> Hi,
> I have a XML file that I want to transform. I want to be able to do a
> search & replace on elements in the XML and replace them. For example:
> Replace <para> with [ParaStyle:para]
> Replace <text> with [ParaStyle:text]
> etc...
> I would like to have all the search & replace in one file which is
> called or imported by the main script. Does something like this already
> exist? I've been searching the internet but can't find a nice example.
> --~------------------------------------------------------------------
> XSL-List info and archive:
> To unsubscribe, go to:
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe@l...>


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.