Re: [xsl] &lt; to < while preserving &amp;

Subject: Re: [xsl] &lt; to < while preserving &amp;
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 26 Jul 2007 16:56:27 +0100
On 7/26/07, Kai Weber <weber@xxxxxxxxxxxxx> wrote:
Hello,

<title>Me &amp; You &lt;i&gt;together&lt;/i&gt;</title>

I tried my best with character-maps to get from the above
XML the following HTML:

<h3>Me &amp; You <i>together</i></h3>

Is this possible? And how could it be done?

You can't without editing your input - the ampersand needs to be double escaped:


<title>Me &amp;amp; You &lt;i&gt;together&lt;/i&gt;</title>

to then use something like saxon:parse()

Not even d-o-e can help you here... best to sort out your input XML to
make markup that is markup and not text that looks like markup.

--
http://andrewjwelch.com

Current Thread