[xsl] Converting e.g. "&lt;tagname&gt;" in the input, to "<tagname>" in the output.

Subject: [xsl] Converting e.g. "&lt;tagname&gt;" in the input, to "<tagname>" in the output.
From: Dylan Walsh <Dylan.Walsh@xxxxxxxxxx>
Date: Wed, 20 Dec 2000 10:34:26 -0000
The possibility has been discussed on the project I'm on of having some
escaped markup in an attributes value.
This markup would be HTML which the XSLT should create as tags in the
output.

For example, given:
<markup value="&lt;p&gt;&lt;b&gt;Hello World&lt;/b&gt;&lt;/p&gt;" />

[I know that would be a very poor way to represent elements in XML, but it
is hack that would save the others some time. ]

Is it possible to have a template that would produce:
<p><b>Hello World</b></p>

in the output?

This came up before, and said I didn't think it would be possible (aside
from being bad practice) but I thought I'd run it by the XSL list gurus this
time to check.

The solution could use disable-output-escaping if that helps, as the output
is being sent from the server to a browser.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread